Home | Advertising Info200 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Tuesday, September 18, 2018  

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

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2018 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com