HttpContext.CurrentHandler 属性

定义

获取表示当前正在执行的处理程序的 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

属性值

一个 IHttpHandler,表示当前正在执行的处理程序。An 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.

适用于

另请参阅