Can't get this If statement to work

Posted on 2006-06-05
Medium Priority
Last Modified: 2010-04-06

<%if strType =((3) or (4) or (5) or (6))  then

Response.write ("Got It")
End IF %>
Question by:eteran
  • 3
LVL 54

Accepted Solution

b0lsc0tt earned 2000 total points
ID: 16838524

If statements are in this format.

If strType = 3 OR strType = 4 OR strType = 5 or strType = 6 then
   Response.Write "Got it"
End if

LVL 54

Expert Comment

ID: 16838536
You need to repeat the test for each OR so I inserted "strType = " for each number.  ASP (vbscript) does not need the statement to be in parenthesis.

Just a side note, but using parenthesis for a response.write string is not needed and I believe has been deprecated.  I am not sure about that though. :-)

Let me know if you have a question or need clarification.

LVL 54

Expert Comment

ID: 16838799
I'm glad that I could help.  Thank you for the grade, the points and the fun question!


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question