Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Redirection

Status
Not open for further replies.

vatik

Technical User
Jul 13, 2001
20
0
0
US
I am trying to make a conditional loop that executes code based on a codition, or will redirect to another page. Response.redirect is not valid in my case because it must be used in the html header.. if anyone would assit it would be greatly appreciated.

ie.

If x = 2 Then
Response.write("yahoo")
Else
""Goto another page""
End if
 
The response.redirect can be used conditionally.

If x = 2 Then
Response.write("yahoo")
Else
response.redirect("otherpage")
End if

Hope this helps


 
Keep in mind, though, that if any http headers have been written to the screen before calling response.redirect(), you'll get an error.

To avoid this error, put this at the top of the page under your default language directive:

<%response.buffer = true%>
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top