HttpResponseWrapper.Redirect 方法

定義

將要求重新導向至不同的 URL。

多載

Redirect(String)

將要求重新導向至指定的 URL。

Redirect(String, Boolean)

將要求重新導向至指定的 URL,並且指定是否終止執行目前的處理序。

Redirect(String)

將要求重新導向至指定的 URL。

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

參數

url
String

目標位置。

例外狀況

在送出 HTTP 標頭之後嘗試重新導向。

適用於

Redirect(String, Boolean)

將要求重新導向至指定的 URL,並且指定是否終止執行目前的處理序。

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

參數

url
String

目標位置。

endResponse
Boolean

true 表示終止目前的處理序,否則為 false。

例外狀況

urlnull

url 包含新行字元。

在送出 HTTP 標頭之後嘗試重新導向。

要求為回呼的結果。

適用於