HttpResponse.Redirect Method

Definition

Overloads

Redirect(String)

Returns a temporary redirect response (HTTP 302) to the client.

Redirect(String, Boolean)

Returns a redirect response (HTTP 301 or HTTP 302) to the client.

Redirect(String)

Returns a temporary redirect response (HTTP 302) to the client.

public:
 virtual void Redirect(System::String ^ location);
public virtual void Redirect (string location);
abstract member Redirect : string -> unit
override this.Redirect : string -> unit
Public Overridable Sub Redirect (location As String)

Parameters

location
String

The URL to redirect the client to. This must be properly encoded for use in http headers where only ASCII characters are allowed.

Redirect(String, Boolean)

Returns a redirect response (HTTP 301 or HTTP 302) to the client.

public:
 abstract void Redirect(System::String ^ location, bool permanent);
public abstract void Redirect (string location, bool permanent);
abstract member Redirect : string * bool -> unit
Public MustOverride Sub Redirect (location As String, permanent As Boolean)

Parameters

location
String

The URL to redirect the client to. This must be properly encoded for use in http headers where only ASCII characters are allowed.

permanent
Boolean

True if the redirect is permanent (301), otherwise false (302).

Applies to