Search DaTutorials:  
HOME
ASP Tutorials
Introduction
Reference
   Building ASP Pages
   Built-in Objects
Tutorials

Redirect

The Redirect method causes the browser to attempt to connect to a different URL.

Syntax

Response.Redirect URL

 

Parameters
URL
The Uniform Resource Locator that the browser is redirected to.
Remarks

Any response body content set explicitly in the page is ignored. However, this method does send other HTTP headers set by this page to the client. An automatic response body containing the redirect URL as a link is generated. The Redirect method sends the following explicit header, where URL is the value passed to the method.

HTTP 1.0 302 Object Moved
Location URL
Example

The following example redirects the user to Microsoft's primary Web site.

<% Response.Redirect "http://www.microsoft.com" %> 
Applies To

Response Object


     Credit Cards | Debt Help | Car Loan | Health & Safety Program | Loans
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp