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
);
- url
- The target location.
Exception Type |
Condition |
HttpException |
Occurs when A redirection is attempted after the HTTP headers have been sent. |
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" );
HttpResponse Members HttpResponse.Redirect Overload List