What is an HttpHandler in ASP.NET

后端 未结 6 707
遥遥无期
遥遥无期 2020-12-02 05:58

What is an HttpHandler in ASP.NET? Why and how is it used?

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 06:53

    Any Class that implements System.Web.IHttpHandler Interface becomes HttpHandler. And this class run as processes in response to a request made to the ASP.NET Site.

    The most common handler is an ASP.NET page handler that processes .aspx files. When users request an .aspx file, the request is processed by the page through the page handler(The Class that implements System.Web.IHttpHandler Interface).

    You can create your own custom HTTP handlers that render custom output to the browser.

    Some ASP.NET default handlers are:

    1. Page Handler (.aspx) – Handles Web pages
    2. User Control Handler (.ascx) – Handles Web user control pages
    3. Web Service Handler (.asmx) – Handles Web service pages
    4. Trace Handler (trace.axd) – Handles trace functionality

提交回复
热议问题