HttpContext.Handler 属性

定义

获取或设置负责处理 HTTP 请求的 IHttpHandler 对象。Gets or sets the IHttpHandler object responsible for processing the HTTP request.

public:
 property System::Web::IHttpHandler ^ Handler { System::Web::IHttpHandler ^ get(); void set(System::Web::IHttpHandler ^ value); };
public System.Web.IHttpHandler Handler { get; set; }
member this.Handler : System.Web.IHttpHandler with get, set
Public Property Handler As IHttpHandler

属性值

负责处理 HTTP 请求的 IHttpHandlerAn IHttpHandler responsible for processing the HTTP request.

注解

Handler 属性包含对处理 HTTP 请求的处理程序的引用。The Handler property contains a reference to the handler that processes the HTTP request. 可以使用httpHandlers元素或在用户代码中定义的自定义处理程序来指定处理程序。The handler can be specified by using the httpHandlers element, or by using a custom handler defined in user code. 有关处理程序的详细信息,请参阅Http 处理程序和 Http 模块概述For more information about handlers, see HTTP Handlers and HTTP Modules Overview.

即使在服务器端方法更改了当前页(如 Execute 方法或 Transfer 方法)后,对 Handler 属性的引用也将保持不变。The reference to the Handler property will remain the same even after the current page has been changed by a server-side method, such as the Execute method or the Transfer method.

适用于

另请参阅