Home | Advertising Info106 USERS CURRENTLY ONLINE   
PowerASP
   Site Search Contact Us Sunday, September 24, 2017  

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 - 2017 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.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program 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