ComputerZen.com - A Boilerplate HttpHandler
Hanselman shows his example of an HTTPHandler. Personally I love working with them - to them point that on days of lesser sanity I contemplate websites composed entirely of handlers and custom controls. All code, no declarative interface. And then I wake up….
Anyways, here is what he says:” …I’ve been writing HttpHandlers lately for such things as Check Images and Statement Downloads. Remember, an HttpHandler is the kind of thing you want to use when an HttpRequest is going to return a file or image to the browser. Basically anything other than a standard page. True, you could use a page, remove all the HTML from the ASPX part, and return stuff in Page_Load, but that’s not really what pages are for, right? Also, Pages are themselves an HttpHandler (returned by PageHandlerFactory) so why not write your own HttpHandler?….”
Write a comment