Tuesday, November 18, 2008

Delving into client side capabilities of ASP.Net Ajax

I believe the client side scripting capabilities of ASP.Net Ajax is not utilized by many ASP.Net developers. This is most probably due to the fact that, not many people are aware of it at the first place. Also, since most of the javascripts are rendered secretly (read, not blatantly, which is good), most developers don't even feel the existence of the underlying javascript at all.

Two very simple examples of the client side library are given here as examples -

1. Did you know, if you have the following javascript method, it will be automatically called when your page's DOM is finished loading?

function pageLoad(sender, args) {
}


2. Do you know the following javascript code will add an event handler to catch whenever an asynchronous post back is completed?



Sys.WebForms.PageRequestManager.instance.add_endRequest(endRequestHandler)


These are just very little glimpses of the big scenario. To uncover more, visit the official MSDN documentation at http://msdn.microsoft.com/en-au/library/bb398822.aspx


If you are new to this, I assure, you will have a much better knowledge about ASP.Net Ajax scripting than ever before and can produce better quality javascript for your ASP.Net websites.


Happy digging!