ASP.NET - What is the use of Generic Handler - Asked By Daniel on 26-Sep-12 02:07 PM

Hi! can someone explain me what is the use of generic handle and in which case we need to create a generic handler file.

us of generic handle - manish postariya replied to Daniel on 26-Sep-12 03:22 PM

we have something that is usually overlooked that is called Generic Handlers. I see a lot o f people using pages to process AJAX requests when we can use this much less expensive endpoint. This is an completely worked out Generic Handler that truly knows how to handle your http (AJAX and not) requests 
Robbe Morris replied to Daniel on 26-Sep-12 04:56 PM
If you are referring to http handlers or .ashx files, these handle incoming http requests with a much less robust life cycle and cut off about 8-10% of the request time versus a ASP.NET page (.aspx file).

Essentially, if you want to make a simple http request and just get back say a string or a string of html, then a .ashx handler file is the way to go.

http://www.eggheadcafe.com/articles/20030113.asp
Jitendra Faye replied to Daniel on 27-Sep-12 01:23 AM
Actually handlers are handle the task before page life cycles events. So you can write such kind of functionality in handlers.