Added: April/27/2004 at 8:13pm | IP Logged
|
|
|
Redirect Example
Instead of sending content to a user, you can redirect the browser to another URL with the Redirect method.
If you are going to redirect the user anytime after the <HTML> tag then you need to turn on buffering. Otherwise you don't need to turn on buffering.
This is how you turn on buffering. (note.. on some servers it may be on by default) This statement must appear before the <HTML> tag.
<% Response.Buffer = True %>
Then you can redirect the browser by doing this.
<% Response.Redirect "mainpage.asp" %>
You can place different redirects within (if/else) statements.
You can also use variables in place of text in the above example.
Example:
<% Page = "mainpage.asp" %>
<% Response.Redirect (Page) %>
__________________
Chris Williams
http://www.PowerASP.com
|