ASP.NET AJAX Overview
Why Use ASP.NET AJAX?
ASP.NET AJAX enables you to build rich Web applications that have many advantages over Web applications that are completely server-based. ASP.NET AJAX applications offer:
Improved efficiency by performing significant parts of a Web page's processing in the browser.
Familiar UI elements such as progress indicators, tooltips, and pop-up windows.
Partial-page updates that refresh only the parts of the Web page that have changed.
Client integration with ASP.NET application services for forms authentication and user profiles.
Integration of data from different sources through calls to Web services.
A framework that simplifies customization of server controls to include client capabilities.
Support for the most popular and generally used browsers, which includes Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari.
ASP.NET AJAX Architecture
ASP.NET AJAX consists of client-script libraries and of server components that are integrated to provide a robust development framework. In addition to ASP.NET AJAX, you can use the ASP.NET AJAX Control Toolkit and the features in the ASP.NET AJAX Futures releases, which are both community supported.
The following illustration shows the functionality that is included in the client-script libraries and server components.
The illustration shows the functionality of the client-based Microsoft AJAX Library, which includes support for creating client components, browser compatibility, and networking and core services. The illustration also shows functionality of server-based ASP.NET 2.0 AJAX Extensions, which includes script support, Web services, application services, and server controls.
ASP.NET AJAX Server Architecture
The ASP.NET AJAX server components consist of ASP.NET Web server controls and components to manage the UI and flow of an application, and to manage serialization, validation, control extensibility, and so on. There are also ASP.NET Web services that enable you to access ASP.NET application services for forms authentication and user profiles.
ASP.NET AJAX Server Controls
The ASP.NET AJAX server controls consist of server and client code that integrate to produce AJAX-like behavior. The following list describes the most frequently used ASP.NET AJAX server controls.
Manages script resources for client components, partial-page rendering, localization, globalization, and custom user scripts. The ScriptManager control is required in order to use the UpdatePanel, UpdateProgress, and Timer controls.
Enables you to refresh selected parts of the page, instead of refreshing the whole page by using a synchronous postback.
Provides status information about partial-page updates in UpdatePanel controls.
Performs postbacks at defined intervals. You can use the Timer control to post the whole page, or use it together with the UpdatePanel control to perform partial-page updates at a defined interval.
ASP.NET AJAX Web Services
ASP.NET AJAX provides Web services that you can use from client script to work with ASP.NET application services for forms authentication and user profiles. This enables you to use client script to help protect resources by using forms authentication and to persist user-specific settings on the server. In addition, ASP.NET AJAX includes network components that make it easy to return results from any Web service call. For information and examples, see Asynchronous Communication Layer Overview and ASP.NET Application Services.
ASP.NET AJAX Server Control Extensibility
ASP.NET AJAX enables you to create custom ASP.NET AJAX server controls that include client behaviors. For more information, see the tutorials in ASP.NET AJAX Extensibility and the Microsoft ASP.NET AJAX Control Toolkit.
ASP.NET AJAX Client Architecture
A browser compatibility layer. This provides compatibility across the most frequently used browsers (including Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari) for your ASP.NET AJAX scripts.
An ASP.NET AJAX base class library, which includes components such as string builders and extended error handling.
A networking layer that handles communication with Web-based services and applications, and that manages asynchronous remote method calls.
Support for accessing server-based forms authentication and profile information in client script. This support is also available to Web applications that are not created by using ASP.NET, as long as the application has access to the Microsoft AJAX Library.
The ASP.NET AJAX architecture provides a model for release and debug modes. Release mode provides error checking and exception handling optimized for performance, with minimized script size. Debug mode provides more robust debugging features, such as type and argument checking. If you create debug versions of custom client scripts or script resources, ASP.NET runs the debug versions when the application is in debug mode. This enables you to throw exceptions in debug scripts while minimizing the size of release code.
A debug helper class, Sys.Debug, provides methods for displaying objects in readable form at the end of a Web page. It also shows trace messages, enables you to use assertions, and lets you break into the debugger. An extended Error Object object API provides helpful exception details with support for release and debug modes.
Localization and Globalization
ASP.NET AJAX builds on the foundation of the ASP.NET 2.0 localization model. It provides additional support for localized script files that are embedded in an assembly or that are provided as .js files on disk. ASP.NET AJAX can serve localized client scripts and resources automatically for specific languages and regions.
For more information, see the following topics:
ASP.NET AJAX Control Toolkit
The ASP.NET AJAX Control Toolkit is a collection of samples and components that show you some of the experiences you can create with rich client ASP.NET AJAX controls and extenders. The Control Toolkit provides samples and a powerful SDK to make it simple to create and reuse custom controls and extenders. You can download the ASP.NET AJAX Control Toolkit from the ASP.NET Ajax Web site. The ASP.NET AJAX Control Toolkit is community supported.
ASP.NET AJAX Community-supported Futures Releases
The ASP.NET AJAX community-supported Futures releases provide features that extend the core ASP.NET AJAX platform with functionality that remains under development and that is not included in the Microsoft ASP.NET AJAX release. This includes additional extender controls, support for client declarative syntax (xml-script), and more. To download and learn more about the Futures release, see the ASP.NET AJAX Web site.