Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

or operator in vbscript

Does vbscript support or operator?

I want to do following code in vbscript, please help me

if a="address1" or b = "address2"
    then Response.Redirect("www.example.com")
endif
like image 507
Novice Developer Avatar asked Feb 23 '10 20:02

Novice Developer


2 Answers

You were really close:

If a = "address1" Or b = "address2" Then 
    Response.Redirect("www.example.com") 
End If
like image 52
Andrew Hare Avatar answered Oct 29 '22 10:10

Andrew Hare


Use parentheses for readability ...

If (a = "address1") Or (b = "address2") Then 
    Response.Redirect("www.example.com") 
End If
like image 37
hmcclungiii Avatar answered Oct 29 '22 10:10

hmcclungiii