Saturday, February 19, 2011

ASP .Net Web Handlers




ASP .Net Generic Handlers

Generic handlers are also called as web handlers. Just as ASPX files can be compiled on the fly (just-in-time), so can handlers. Generic handlers have an extension of ASHX. They contain classes that fully implement IHttpHandler. They're convenient in the same way ASPX files are convenient. You simply surf to them and they're compiled automatically.
Now you would probably have a question in your mind that “why should I use a generic handlers when I can do same thing using web service? “ Now if you know web service needs a consumer event or page to consume its output but in case of Generic Handler you do not need a consumer service. You just can browse through the page where IHttpHandler will do the rest of the work for you or maybe you are in a situation where you need output from something without calling any function, in such scenario web handlers are very handy!
So suppose you want to start using a web handler you can learn to use the same thing from here:
My point is to help people know things as easily as possible so I use copy paste since everything is available in internet! Ctrl+C and Ctrl+V the most prominent tool!
My main reason to come across Web handlers is due to auto complete feature in my project where I was not allowed to use Ajax since I work in a domain which is mainly linked to banking sector, where security and machine speed is considered at high end! In short there are lot of bankers who are very high profiled and they don’t have high configuration machine and they have requirement of security and high functional application with less trouble. So I was enforced to use Jquery.
Ah!! I was at auto complete. Now you must have seen in www.google.com when you type something you get the rest of the things coming up in text box! Ya that is auto complete. Now this one I got it from some site which seems to be worthy for me http://www.aspsnippets.com/Articles/Using-jQuery-AutoComplete-Plugin-in-ASP.Net.aspx try it out!
So Happy Learning!

Post a Comment