Partager via


Overview: ASP.NET AJAX and Web Parts in Windows SharePoint Services 3.0

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

You can now extend Microsoft ASP.NET 2.0 by using Microsoft ASP.NET 2.0 AJAX Extensions 1.0, which is a new Microsoft Web development technology that integrates cross-browser script libraries with the ASP.NET 2.0 Web application framework. ASP.NET AJAX allows you to quickly create pages with sophisticated, responsive user interfaces and more efficient client-server communication, simply by adding a few server controls to your Web pages. This allows you to define "updatable" regions of a Web Page. With ASP.NET AJAX, server roundtrips become asynchronous and ASP.NET AJAX handles the entire infrastructure.

This topic introduces Microsoft ASP.NET AJAX Extensions 1.0 technology in the context of Windows SharePoint Services 3.0. It also provides an overview of the server controls provided with ASP.NET AJAX. For a comprehensive look at the technology behind ASP.NET AJAX, see About ASP.NET AJAX.

Microsoft ASP.NET AJAX

ASP.NET AJAX enables you to create Web pages that use partial-page updates to create a dynamic user experience. ASP.NET AJAX includes AJAX Extensions 1.0, which is the server-side control framework, and the Microsoft AJAX Library, which is the set of client-side browser scripts.

The Microsoft AJAX Library can be installed without the .NET Framework. It can also be used in environments that are not Windows-based, to create Web applications for browsers that support JavaScript. See ASP.NET AJAX Downloads to download the ASP.NET 2.0 AJAX Extensions 1.0, the Microsoft AJAX Library, and other ASP.NET AJAX components.

Server Controls in Microsoft ASP.NET AJAX

ASP.NET 2.0 AJAX Extensions include server-side controls that are used for partial-page updates, as well as progress bars, timers, and script management components.

ASP.NET AJAX server controls encapsulate both client and server behavior. A brief overview of the server-side controls is included here.

ScriptManager

The ScriptManager control manages all client script for ASP.NET AJAX. The ScriptManger automatically registers the script for ASP.NET AJAX when you add it to the Web page. You must add this as the first item in the page controls collection. The ScriptManager controls partial-page rendering in a browser when a page contains one or more UpdatePanel controls.

UpdatePanel

The UpdatePanel control stores other controls and allows partial-page updates. The UpdatePanel control allows you to request partial-page updates without writing any client script. Quite simply, controls within the UpdatePanel control which ordinarily would post back to update their data will now be routed through an Ajax-style callback, resulting in a silent update back to the server. This makes interaction between your application and your control more seamless, because there are no post back events. You can, however, add custom client-side script if you want to enable key scenarios and enhance the client user experience. The UpdatePanel and associated triggers are tracked by the ScriptManager control.

UpdateProgress

The UpdateProgress control provides status information on partial-page updates in UpdatePanel controls. By default, a div element is created and displayed while an update is in progress. You can customize the default display of the div control by using the ProgressTemplate property.

Timer

The Timer control fires a postback at defined intervals. You can also use the Timer control to post the whole page rather than partial-page updates. Timer controls can be used inside or outside of an UpdatePanel control. If you want the Timer control to trigger an update, you must add a trigger attribute to the UpdatePanel control declaration.

See Also

Other Resources

ASP.NET AJAX Roadmap

AJAX Server Controls: ScriptManager Control Overview

AJAX Server Controls: Timer Control Overview

AJAX Server Controls: UpdatePanel Control Overview

AJAX Server Controls: UpdateProgress Control Overview

ASP.NET Wiki: Security