implementing mor than one variable in an asp if else statement

R

Ray

I currently have an asp script that has a code like If (something) = "something" then Response.redirect Els End If vut I want to include more than one option for the second something like If(something) = "something", "something" then Response.Redirect. I have tried placing them each in "()" seperating them with ","and";" but nothing worked. Thanks for your help. Ray
 
T

Thomas A. Rowe

<%
If fname = " thomas" and lname = "rowe" then
Response.Redirect "pagename.asp"
End If
%>

<%
If fname = " william" or fname = "george" then
Response.Redirect "pagename.asp"
End If
%>
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Ray said:
I currently have an asp script that has a code like If (something) = "something" then
Response.redirect Els End If vut I want to include more than one option for the second something
like If(something) = "something", "something" then Response.Redirect. I have tried placing them each
in "()" seperating them with ","and";" but nothing worked. Thanks for your help. Ray
 
K

Kevin Spencer

Nested If Statements:

If <condition that resolves to true or false> Then
<Statements of execution>
Else
If <condition that resolves to true or false> Then
<Statements of execution>
Else
If <condition that resolves to true or false> Then
End If
End If
End If

etc.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Ray said:
I currently have an asp script that has a code like If (something) =
"something" then Response.redirect Els End If vut I want to include more
than one option for the second something like If(something) = "something",
"something" then Response.Redirect. I have tried placing them each in "()"
seperating them with ","and";" but nothing worked. Thanks for your help. Ray
 
Top