HttpContext.CurrentHandler HttpContext.CurrentHandler HttpContext.CurrentHandler HttpContext.CurrentHandler Property

定義

取得表示目前正在執行處理常式的 IHttpHandler 物件。Gets the IHttpHandler object that represents the currently executing handler.

public:
 property System::Web::IHttpHandler ^ CurrentHandler { System::Web::IHttpHandler ^ get(); };
public System.Web.IHttpHandler CurrentHandler { get; }
member this.CurrentHandler : System.Web.IHttpHandler
Public ReadOnly Property CurrentHandler As IHttpHandler

屬性值

表示目前正在執行之處理常式的 IHttpHandlerAn IHttpHandler that represents the currently executing handler.

備註

CurrentHandler屬性所參考之目前正在執行的處理常式, 可能不同于Handler屬性所參考的處理常式。The currently executing handler that is referenced by the CurrentHandler property might be different than the handler that is referenced by the Handler property. 當使用Execute方法Transfer或方法要求另一個處理常式時, 就可能發生這種情況。This can occur when another handler was requested by using the Execute method or the Transfer method. 當目前執行的處理常式完成處理時, 會還原先前決定的處理常式。When the currently executing handler finishes processing, the previously determined handler is restored.

適用於

另請參閱