C-DEngine 5.105

HttpListenerResponse..::..Redirect Method

Configures the response to redirect the client's request to the specified url.

Namespace:  WebSocketSharp.Net
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public void Redirect(
	string url
)
Public Sub Redirect ( _
	url As String _
)
public:
void Redirect(
	String^ url
)

Parameters

url
Type: String
A String that represents the URL to redirect the client's request to.

Exceptions


ExceptionCondition
ArgumentNullExceptionurl is nullNothingnullptra null reference (Nothing in Visual Basic).
ArgumentExceptionurl isn't an absolute URL.
InvalidOperationException The response has already been sent.
ObjectDisposedException This object is closed.

Remarks


This method sets the RedirectLocation property to url, the StatusCode property to 302, and the StatusDescription property to "Found".