Sunday, May 04, 2008

AJAX -Introduction

Introduction
AJAX stands for Asynchronous JavaScript and XML. Working in ASP.Net with AJAX, developers can develop ASP.Net web applications more user friendly and fast enough to provide data with page postbacks. This programming methodology has removed old fashioned page refreshing method that throws the user back to the page top and lose the context where he was working before clicking the submit button to save data.

ASP.Net Postbacks
ASP.Net methodology based on client server data exchange works as all the data from the client end is sent to the web server then the web server processes the data and sends back to the client. It means AJAX has the ability to make asynchronous calls to a web server. AJAX sends only necessary data to the web server.

AJAX and ASP.Net Framework
ASP.Net framework considers AJAX as a client callback scripts. AJAX enables you to update the page content without posting the page back to the server. Basically AJAX uses XMLHttp ActiveX component or the XMLHttpRequest according to the client’s browser such as Internet Explorer or FireFox.

AJAX allows partial page postbacks that minimize the network usage by not sending the all form data to the server. This method enables the server to perform only limited actions on the data received coz the server does not need to process the whole page elements or images. There is no need to process the viewstate, images or all page elements to send back to the client while processing partial postbacks.

With AJAX there is no full page postback that maintains page location even when user clicks the submit button to perform some action on the page. Hence the use state is maintained and the user doesn’t need to scroll down to the location where he was working before clicking the submit button.