Q1 - What is AJAX?
A - Ajax stands for Asynchronous Javascript & XML. It is a web technology through which a postback from a client (browser) to
the server goes partially, which means that instead of a complete postback, a partial postback is triggered by the Javascript
XmlHttpRequest object. In such a scenario, web-application users won't be able to view the complete postback progress bar
shown by the browser. In an AJAX environment, it is Javascript that starts the communication with the web server.
Ajax technology in a website may be implemented by using plain Javascript and XML. Code in such a scenario may tend to look
little complex, for which the AJAX Framework in .NET can be embedded in ASP.NET web applications.
In addition to XML & Javascript, AJAX is also based on DOM - the Document Object Model technology of browsers through which
objects of the browser can be accessed through the memory heap using their address.
JSON - Javascript Object Notation is also one of the formats used in AJAX, besides XML.
So basically, in an AJAX-based web application, the complete page does not need to reload, and only the objects in context of
ajaxification are reloaded.
Ajax technology avoids the browser flickering.
Q2 - Can Ajax be implemented in browsers that do not support the XmlHttpRequest object?
A - Yes. This is possible using remote scripts.
Q3 - Can AJAX technology work on web servers other than IIS?
A - Yes, AJAX is a technology independent of web server the web application is hosted on. Ajax is a client (browser)
technology.
Q4 - Which browsers support the XmlHttpRequest object?
A - Internet Explorer 5.0+, Safari 1.2, Mozilla 1.0/Firefox, Opera 8.0 +, Netscape 7
Q5 - How to we create an XmlHttpRequest object for Internet Explorer? How is this different for other browsers?
A - For Internet Explorer, an ActiveXObject is used for declaring an XmlHttpRequest object in Javascript.
//Code as below for IE:
xmlHttpObject = new ActiveXObject("Msxml2.XMLHTTP");
//For Other browsers, code as below:
xmlHttpObject = new XMLHttpRequest();
Note that XmlHttpObject used above is simply a variable that holds the XmlHttpRequest object for the respective browsers.
Q6 - What are the properties of the XmlHttpRequest object? What are the different types of readyStates in Ajax?
A - i) onreadyStateChange - This function is used to process the reply from the web server.
ii) readyState - This property holds the response status of the web server. There are 5 states:
0 - request not yet initialized
1 - request now set
2 - request sent
3 - request processing
4 - request completes
iii) responseText - Has the data sent back by the web server
Code snippet below shows an example how these there properties are used to implement ajax :
xmlHttpObject.onreadystatechange=function()
{
if(xmlHttpObject.readyState==4)
{
document.Form1.time.value=xmlHttpObject.responseText;
}
}
Q7 - What is the ASP.NET Ajax Framework? What versions have been released so far?
A - ASP.NET AJAX is a free framework to implement Ajax in asp.net web applications, for quickly creating efficient and
interactive Web applications that work across all popular browsers.
The Ajax Framework is powered with
1 - Reusable Ajax Controls
2 - Support for all modern browsers
3 - Access remote services and data from the browser without tons of complicated script.
Versions of Ajax release
1 - ASP.NET Ajax Framework 1.0 (earlier release to this was called the Atlas)
2 - ASP.NET Ajax Framework 1.0 was available as a separate download for ASP.NET 2.0
Q8 - What are Ajax Extensions?
A - The ASP.NET Ajax Extensions are set of Ajax-based controls that work in ASP.NET 2 (or above) based applications.
Ofcourse,they also need the Ajax runtime which is actually the Ajax Framework 1.0.
ASP.NET Ajax Extensions 1.0 have to be downloaded to run with ASP.NET 2.0
The new ASP.NET 3.5 Framework comes with the Ajax Library 3.5 (containing the Ajax Extensions 3.5). So in order to use the
latest Ajax, simply download .NET 3.5 Framework.
Summary :
ASP.NET Ajax Extensions 1.0 -> For ASP.NET 2.0
ASP.NET Ajax Extensions 3.5 -> For ASP.NET 3.5
Q9 - What is the ASP.NET Control Toolkit?
A - Besides the Ajax Framework (which is the Ajax engine) and Ajax Extensions (which contain the default Ajax controls),
there is a toolkit called the Ajax Control Toolkit available for use & download (for free). This is a collection of rich
featured, highly interactive controls, created as a joint venture between Microsoft & the Developer Community.
Q10 - What is Dojo?
A