machine_run
asked on
classic Asp : Or statement syntax?
Using classic asp, what is the syntax for If and or? For example what would be the correct way to do this:
if((Recordset1.Fields.Item ("STATE"). Value)=="N Y" OR (Recordset1.Fields.Item("S TATE").Val ue)=="IL") {
if((Recordset1.Fields.Item
ASKER
500 INTERNAL SERVER ERROR
also, the { is from asp.net ....
in asp:
if (condition) then
...
else
..
end if
in asp:
if (condition) then
...
else
..
end if
Try
if Recordset1.Fields.Item("STATE").Value ="NY" OR Recordset1.Fields.Item("STATE").Value ="IL" then
'Other statements
end if
ASKER
There is some old code on the site that is not causing an error:
What is the "&&" statment?
if((Recordset1.Fields.Item ("STATE"). Value)=="N Y" && (Recordset1.Fields.Item("S TATE").Val ue)=="IL") {
else
{
What is the "&&" statment?
if((Recordset1.Fields.Item
else
{
ASKER
if((Recordset1.Fields.Item ("STATE"). Value)=="N Y" | (Recordset1.Fields.Item("S TATE").Val ue)=="IL") {
Appears to be working.
Appears to be working.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
angellll and om_prakash_p, Sorry about the asp / javascript confusion.
THANKS!
THANKS!
Open in new window