HttpResponseBase.Redirect 方法

定義

將要求重新導向至不同的 URL。Redirects a request to a different URL.

多載

Redirect(String)

將要求重新導向至指定的 URL。Redirects a request to the specified URL.

Redirect(String, Boolean)

將要求重新導向至指定的 URL,並且指定是否終止執行目前的處理序。Redirects a request to the specified URL and specifies whether execution of the current process should terminate.

Redirect(String)

將要求重新導向至指定的 URL。Redirects a request to the specified URL.

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

參數

url
String

目標位置。The target location.

例外狀況

永遠。Always.

適用於

Redirect(String, Boolean)

將要求重新導向至指定的 URL,並且指定是否終止執行目前的處理序。Redirects a request to the specified URL and specifies whether execution of the current process should terminate.

public:
 virtual void Redirect(System::String ^ url, bool endResponse);
public virtual void Redirect (string url, bool endResponse);
abstract member Redirect : string * bool -> unit
override this.Redirect : string * bool -> unit
Public Overridable Sub Redirect (url As String, endResponse As Boolean)

參數

url
String

目標位置。The target location.

endResponse
Boolean

true 表示終止目前的處理序,否則為 false。true to terminate the current process.

例外狀況

永遠。Always.

適用於