Ajaxify ASP.NET 2.0 apps with AJAX 1.0

Recently started using the AJAX 1.0 framework for building web apps with ASP.NET 2.0. Amazingly simple and easy to use. The AJAX framework consists of very few controls. The most important of which is the Script Manager, Update Panel and Update Progress controls. Now after installing the framework, all I had to do was place the Script Manager control on the webform. The script manager is the control which registers the client side scripts for ajaxifying the web app i.e. instantiates the XMLHTTP activex object and collectively gathers response when the ready state is successfull(4). It also performs the partial page rendering on the respective page. After placing the script manager on the web page, drag and drop the update panel control onto your web page. Any server controls that require asynchronous postbacks to occur, must be placed within the update panel. Also ensure that the page attribute EnableEventValidation property is set to false.Walaah, your webpage with Ajax is done. The following websites were a tremendous help in understanding these controls:

ASP.NET AJAX Controls
ASP.NET Page Event Validation

Note: Do not try to use a Response.Write() when you are using these controls, bcoz the script manager basically does it for you and it does not understand any other HTML or data that needs to be written on the aspx page without having complete control over it. It will give an error alert box.

Comments

Popular posts from this blog

System.ConfigurationSettings.AppSettings is Obsolete

Branding your SharePoint site in a super fast way - Emgage

Sharepoint & SSRS integration Issues