asp.net.ph

Response.Redirect Method ( String )

System.Web Namespace   HttpResponse Class


Redirects a client to a new URL and specifies the new URL.

[ VB ]
Overloads Public Sub Redirect ( _
   ByVal url As String _
)

[ C# ]
public void Redirect (
   string url
);

[ C++ ]
public: void Redirect (
   String* url
);

[ JScript ]
public function Redirect (
   url : String
);

Parameters

url
The target location.

Exceptions


Exception Type Condition
HttpException Occurs when A redirection is attempted after the HTTP headers have been sent.

Example

The following example forces an unconditional redirection to another Web site.

[ VB ] 
Response.Redirect ( "http://www.microsoft.com/gohere/look.htm" )

[ C# ] 
Response.Redirect ( "http://www.microsoft.com/gohere/look.htm" );
   
See Also

HttpResponse Members   HttpResponse.Redirect Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph