10.1. Introducing Ajax
The concepts behind Ajax have been around for many years. Browsers since Internet Explorer 5 have shipped with the XMLHttpRequest object that allowed you to make calls to the server from JavaScript to send and receive data. However, people also used other techniques to emulate the behavior of what is now called Ajax, including Macromedia Flash, iframe elements, or hidden frames.
However, when the term Ajax was introduced, things really took off. In an attempt to stay ahead of the curve, Microsoft started building ASP.NET AJAX, the Ajax Framework that is now fully integrated in ASP.NET and Visual Web Developer 2008. This framework offers a number of benefits that you as a web developer can take advantage of to create responsive applications. In particular, ASP.NET AJAX enables you to:
Create flicker-free pages that allow you to refresh portions of the page without a full reload and without affecting other parts of the page.
Provide feedback to your users during these page refreshes.
Update sections of a page and call server-side code on a scheduled basis.
Access server-side Web Services and work with the data they return.
Use the rich, client-side programming framework to access and modify elements in your page, and get access to a code model and type system that looks similar to that of the .NET Framework.
In the remainder of this chapter, you see how to use the ASP.NET AJAX Framework to create rich and interactive web applications. Note that Ajax itself is ...