ASPProtect ( Click Here For More Details !!! )
Return To Home Page - Link to "The Wanker" - Contact Us


Return To Home Page

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


Banner
ASP (Active Server Pages) is a technology developed by Microsoft. Pages using ASP are primarily developed in JScript, or VBScript and are integrated into the HTML of your Web pages. The ASP code is compiled on-the-fly by the server and the resulting output is standard HTML. By using ASP, Web pages can be dynamic, full of ever-changing content, and browser independent.

 

Link to "The Wanker"
© 2007 CodeWanker - Active Server Pages Articles, Code Snippets, & Tutorials