implementing mor than one variable in an asp if else statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
<%
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top