1. What is ASP.NET AJAX?
ASP.NET AJAX, mostly called AJAX, is a set of extensions of ASP.NET. It is developed by Microsoft to implement AJAX functionalities in Web applications. ASP.NET AJAX provides a set of components that enable the developers to develop applications that can update only a specified portion of data without refreshing the entire page. The ASP.NET AJAX works with the AJAX Library that uses object-oriented programming (OOP) to develop rich Web applications that communicate with the server using asynchronous postback.
2. What is the difference between synchronous postback and asynchronous postback?
The difference between synchronous and asynchronous postback is as follows:
Asynchronous postback renders only the required part of the page; whereas, synchronous postback renders the entire page for any postback.
Asynchronous postback executes only one postback at a time, that is, if you have two buttons doing asynchronous postback, the actions will be performed one by one; whereas, synchronous postback executes all the actions at once.
Asynchronous postback only modifies the update panel that raises the postback; whereas, synchronous postback modifies the entire page.
3. What technologies are being used in AJAX?
AJAX uses four technologies, which are as follows:
JavaScript
XMLHttpRequest
Document Object Model (DOM)
Extensible HTML (XHTML) and Cascading Style Sheets (CSS)
4. Why do we use the XMLHttpRequest object in AJAX?
The XMLHttpRequest object is used by JavaScript to transfer XML and other text data between client and server. The XMLHttpRequest object allows a client-side script to perform an HTTP request. AJAX applications use the XMLHttpRequest object so that the browser can communicate to the server without requiring a postback of the entire page. In earlier versions of Internet Explorer, MSXML ActiveX component is liable to provide this functionality; whereas, Internet Explorer 7 and other browsers, such as Mozilla Firefox, XMLHttpRequest is not liable to.
5. How can we get the state of the requested process?
XMLHttpRequest get the current state of the request operation by using the readyState property. This property checks the state of the object to determine if any action should be taken. The readyState property uses numeric values to represent the state.
6. What are the different controls of ASP.NET AJAX?
ASP.NET AJAX includes the following controls:
ScriptManager
ScriptManagerProxy
UpdatePanel
UpdateProgress
Timer