Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with an if statement

Status
Not open for further replies.
Jan 19, 2003
34
0
0
US
I'm new to VBScript and I need to write this code in a hurry. It's for an ASP Page, and basically I need it to check to see if there is a query string passed to it and if so to execute an ASP statement and otherwise not to execute it. Any help would be appreciated.
 
I'm not sure if I understood ur stement very well...but here goes...

dim strQuery ' variable to place the query string
...
if strQuery <> &quot;&quot; then
...'ur asp statement
end if
 
Yea man. That's all I needed. I've only ever programmed in C++ and I haven't learned this syntax yet. It's a little loose for my taste. I knew what I wanted, just didn't know how to get it. Thanks a lot.
 
A suggestion that might help you in the future is to use JScript instead of VBScript (blasphemy in a VBScript forum!) You may find it's more akin to C++ in its syntax and ASP pages shouldn't care if you set it up right. I'm more familiar with VB but I've been known to add a little JScript in when it make sense (like sorting).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top