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!

ASP syntax help please. 1

Status
Not open for further replies.

ColonelBlue

Technical User
Jun 24, 2004
110
US
There must be a simpler and efficacious way to write this:
Code:
If (strQuery="and") or (strQuery="with") or (strQuery="...") then
and where I can add more words if necessary.
Would someone please be so kind to help? :)

Thanks in advance.
 
What scripting language are you using on the backend?? Jscript or VBscript

Sadly, I don't think there is a faster way to write this code, you can use a CASE statement though, it would go something like this:
Code:
select case strQuery
  case "and","with", "..."
    msgbox "WOWOWOWOW lot of cases"
end select

This is a little less code and easy to add another case on

<.
 
Thanks monksnake.
I don't feel too much of a newbie now. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top