faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Language and Syntax

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 22 people (82%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

if AND OR syntax? something like: if ((this=true)and(that=true)) then

Mar 23rd, 2004 00:35
Jason Benson, carsten dfgb,


Combine and seperate with parenthesis

Example:

<%
If (Var1="true" AND Var2="true") OR (Var3="true") Then

Response.Write "Variables Passed"

End IF %>

the above: if Var1 and Var2 = "true" then "Variables Passed" would be 
written.
OR if Var3="true" the same would be written.

If Var1 OR Var2 <> "true" then nothing would be written

hope that helps
jb



© 1999-2004 Synop Pty Ltd