HttpServerUtilityBase.Transfer 方法

定義

在衍生類別中覆寫時,結束執行目前的處理序,並且開始對目前的要求執行不同的處理序。When overridden in a derived class, terminates execution of the current process and starts execution of a different process for the current request.

多載

Transfer(String)

在衍生類別中覆寫時,會終止執行目前的處理序,並開始執行以 URL 指定的頁面或處理常式。When overridden in a derived class, terminates execution of the current process and starts execution of a page or handler that is specified with a URL.

Transfer(String, Boolean)

在衍生類別中覆寫時,結束目前網頁的執行,並開始執行不同的頁面或處理常式,方法是使用指定的 URL 和值,其指定是否要清除 QueryStringForm 集合。When overridden in a derived class, terminates execution of the current page and starts execution of a different page or handler by using the specified URL and a value that specifies whether to clear the QueryString and Form collections.

Transfer(IHttpHandler, Boolean)

在衍生類別中覆寫時,使用自訂 HTTP 處理常式,以及指定是否要清除 QueryStringForm 集合的值,結束執行目前的處理序並開始執行新要求。When overridden in a derived class, terminates execution of the current process and starts execution of a new request, using a custom HTTP handler and a value that specifies whether to clear the QueryString and Form collections.

Transfer(String)

在衍生類別中覆寫時,會終止執行目前的處理序,並開始執行以 URL 指定的頁面或處理常式。When overridden in a derived class, terminates execution of the current process and starts execution of a page or handler that is specified with a URL.

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

參數

path
String

要執行的網頁 URL 或處理常式。The URL of the page or handler to execute.

例外狀況

永遠。Always.

適用於

Transfer(String, Boolean)

在衍生類別中覆寫時,結束目前網頁的執行,並開始執行不同的頁面或處理常式,方法是使用指定的 URL 和值,其指定是否要清除 QueryStringForm 集合。When overridden in a derived class, terminates execution of the current page and starts execution of a different page or handler by using the specified URL and a value that specifies whether to clear the QueryString and Form collections.

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

參數

path
String

要執行的網頁 URL 或處理常式。The URL of the page or handler to execute.

preserveForm
Boolean

true 表示保留 QueryStringForm 集合; false 表示清除 QueryStringForm 集合。true to preserve the QueryString and Form collections; false to clear the QueryString and Form collections.

例外狀況

永遠。Always.

適用於

Transfer(IHttpHandler, Boolean)

在衍生類別中覆寫時,使用自訂 HTTP 處理常式,以及指定是否要清除 QueryStringForm 集合的值,結束執行目前的處理序並開始執行新要求。When overridden in a derived class, terminates execution of the current process and starts execution of a new request, using a custom HTTP handler and a value that specifies whether to clear the QueryString and Form collections.

public:
 virtual void Transfer(System::Web::IHttpHandler ^ handler, bool preserveForm);
public virtual void Transfer (System.Web.IHttpHandler handler, bool preserveForm);
abstract member Transfer : System.Web.IHttpHandler * bool -> unit
override this.Transfer : System.Web.IHttpHandler * bool -> unit
Public Overridable Sub Transfer (handler As IHttpHandler, preserveForm As Boolean)

參數

handler
IHttpHandler

要對其傳輸目前要求的 HTTP 處理常式。The HTTP handler to transfer the current request to.

preserveForm
Boolean

true 表示保留 QueryStringForm 集合; false 表示清除 QueryStringForm 集合。true to preserve the QueryString and Form collections; false to clear the QueryString and Form collections.

例外狀況

永遠。Always.

適用於