Very noob question,
In asp.net can you explain in the simplest possible way “what is an handler?”
How can you use handlers..
Thanks a lot.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you mean an “event handler”, or something that inherits from
IHttpHandler? In both cases handler describes something that reacts to an event occuring. An event handler would be, for example, a method that is called when a button is clicked:Something that inherits from
IHttpHandlercould be, for example, a page in an ASP.net Web Forms application (as all pages you create inherit fromSystem.Web.UI.Pagewhich in turn inherits fromIHttpHandler) or a “Generic Handler” (a file usually with the extension .ashx).An example of a generic handler would be:
This would be more performant than having an ASP.net Web Forms page that did similar as it doesn’t need to build all the Web Forms “framework” of the page lifecycle, viewstate and so on for each request, which means that it’s better suited to requests that don’t need to render presentation/markup, such as anything that would be responding to an AJAX request.