HttpServerUtilityBase.Execute 方法

定義

在衍生類別中覆寫時,執行目前要求內容中指定之資源的處理常式,並將執行傳回叫用它的處理序。When overridden in a derived class, executes the handler for a specified resource in the context of the current request and returns execution to the process that invoked it.

多載

Execute(String)

在衍生類別中覆寫時,於目前處理序的內容中,執行所指定虛擬路徑的處理常式。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process.

Execute(String, Boolean)

在衍生類別中被覆寫時,在目前處理序的內容中,執行指定虛擬路徑的處理常式,並指定是否清除 QueryStringForm 集合。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process and specifies whether to clear the QueryString and Form collections.

Execute(String, TextWriter)

在衍生類別中覆寫時,在目前處理序的內容中,執行指定虛擬路徑的處理常式,並使用 TextWriter 執行個體從執行的處理常式中擷取輸出。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process, using a TextWriter instance to capture output from the executed handler.

Execute(String, TextWriter, Boolean)

在衍生類別中覆寫時,執行目前要求內容中指定虛擬路徑的處理常式,並使用 TextWriter 執行個體從此頁面擷取輸出,以及指定是否清除 QueryStringForm 集合的值。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current request, using a TextWriter instance to capture output from the page and a value that indicates whether to clear the QueryString and Form collections.

Execute(IHttpHandler, TextWriter, Boolean)

在衍生類別中覆寫時,執行目前處理序內容中的指定處理常式,並使用 TextWriter 執行個體從執行的處理常式擷取輸出,以及指定是否清除 QueryStringForm 集合的值。When overridden in a derived class, executes the specified handler in the context of the current process, using a TextWriter instance to capture output from the executed handler and a value that specifies whether to clear the QueryString and Form collections.

Execute(String)

在衍生類別中覆寫時,於目前處理序的內容中,執行所指定虛擬路徑的處理常式。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process.

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

參數

path
String

要執行的處理常式 URL。The URL of the handler to execute.

例外狀況

永遠。Always.

適用於

Execute(String, Boolean)

在衍生類別中被覆寫時,在目前處理序的內容中,執行指定虛擬路徑的處理常式,並指定是否清除 QueryStringForm 集合。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process and specifies whether to clear the QueryString and Form collections.

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

參數

path
String

要執行的處理常式 URL。The URL of the 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.

適用於

Execute(String, TextWriter)

在衍生類別中覆寫時,在目前處理序的內容中,執行指定虛擬路徑的處理常式,並使用 TextWriter 執行個體從執行的處理常式中擷取輸出。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process, using a TextWriter instance to capture output from the executed handler.

public:
 virtual void Execute(System::String ^ path, System::IO::TextWriter ^ writer);
public virtual void Execute (string path, System.IO.TextWriter writer);
abstract member Execute : string * System.IO.TextWriter -> unit
override this.Execute : string * System.IO.TextWriter -> unit
Public Overridable Sub Execute (path As String, writer As TextWriter)

參數

path
String

要執行的處理常式 URL。The URL of the handler to execute.

writer
TextWriter

要擷取輸出的物件。An object to capture the output.

例外狀況

永遠。Always.

備註

writer參數會以傳址方式傳遞給 Execute 方法。The writer parameter is passed by reference to the Execute method. 若要在方法完成之後取出處理常式的輸出,您可以使用物件的屬性和方法 writerTo retrieve the output from the handler after the method completes, you use the properties and methods of the writer object. 如需範例,請參閱 ExecuteFor an example, see Execute.

適用於

Execute(String, TextWriter, Boolean)

在衍生類別中覆寫時,執行目前要求內容中指定虛擬路徑的處理常式,並使用 TextWriter 執行個體從此頁面擷取輸出,以及指定是否清除 QueryStringForm 集合的值。When overridden in a derived class, executes the handler for the specified virtual path in the context of the current request, using a TextWriter instance to capture output from the page and a value that indicates whether to clear the QueryString and Form collections.

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

參數

path
String

要執行的處理常式 URL。The URL of the handler to execute.

writer
TextWriter

要擷取輸出的物件。The object to capture the output.

preserveForm
Boolean

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

例外狀況

永遠。Always.

備註

writer參數會以傳址方式傳遞給 Execute 方法。The writer parameter is passed by reference to the Execute method. 若要在方法完成之後取出處理常式的輸出,您可以使用物件的屬性和方法 writerTo retrieve the output from the handler after the method completes, you use the properties and methods of the writer object. 如需範例,請參閱 ExecuteFor an example, see Execute.

適用於

Execute(IHttpHandler, TextWriter, Boolean)

在衍生類別中覆寫時,執行目前處理序內容中的指定處理常式,並使用 TextWriter 執行個體從執行的處理常式擷取輸出,以及指定是否清除 QueryStringForm 集合的值。When overridden in a derived class, executes the specified handler in the context of the current process, using a TextWriter instance to capture output from the executed handler and a value that specifies whether to clear the QueryString and Form collections.

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

參數

handler
IHttpHandler

HTTP 處理常式,實作要將目前要求傳輸至其中的介面。The HTTP handler that implements the interface to transfer the current request to.

writer
TextWriter

要擷取輸出的物件。The object to capture the output.

preserveForm
Boolean

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

例外狀況

永遠。Always.

備註

writer參數會以傳址方式傳遞給 Execute 方法。The writer parameter is passed by reference to the Execute method. 若要在方法完成之後取出處理常式的輸出,您可以使用物件的屬性和方法 writerTo retrieve the output from the handler after the method completes, you use the properties and methods of the writer object. 如需範例,請參閱 ExecuteFor an example, see Execute.

適用於