MSDN Magazine - February 2008 - (Page 40) SPECIAL ADVERTISING SECTION The asynchronous communications layer provides support for behind-the-scenes network communications as well as for JavaScript-based data transmission. The browser compatibility layer enables ASP.NET AJAX sites to work with all the most popular Web browsers, including Internet Explorer, Firefox, Safari and Opera. ASP.NET AJAX is included with the .NET Framework 3.5 and is available by default with projects created by Visual Studio 2008. The ASP.NET AJAX Extensions are available in the System.Web.Extensions.dll and System.Web.Extensions. Design.dll assemblies. Control ScriptManager ScriptManagerProxy Description Enables ASP.NET AJAX to be used in a Web page. Enables content pages to add script references and service references to a ScriptManager control declared in a master page. UpdatePanel UpdateProgress Timer Implements partial-page loading in a Web page. Displays feedback while UpdatePanel partial-page updates are pending. Implements a method for periodically performing program tasks without requiring user action. The UpdatePanel Control Probably the most compelling control in the entire ASP.NET AJAX tool suite is the UpdatePanel control, more easily described as “partial-page loading in a box.” The UpdatePanel thoroughly abstracts the mechanics of loading and updating individual parts of a Web page, so using it completely shields the developer from all JavaScript requirements. Figure 5 illustrates how UpdatePanel controls perform partial-page loading, and why partial-page loading eliminates the excessive flashing that characterizes many Web pages. In a traditional update, the page posts back to the server. The browser erases the page and redraws it using the new content returned from the server. A page with an UpdatePanel control works differently. The UpdatePanel automatically converts postback calls from controls inside it into asynchronous XML-HTTP calls. The browser does not erase the page, and when the callback executes, the UpdatePanel control updates its inner content using JavaScript. This update of the page content creates a seamless user experience with no visual distractions, because the page does not flash. This update also happens much faster because the browser does not have to parse and redraw the entire page. Figure 4: The ASP.NET AJAX server controls ASP.NET AJAX Server Controls The ASP.NET AJAX server controls supplement the other core server controls built into ASP.NET (TextBox, Panel, TreeView, and more). The AJAX controls conform to the programming model and usage patterns developers already know. In Visual Studio, AJAX controls can be dropped onto the design surface from the control toolbox to quickly add AJAX capabilities to a page. Figure 4 lists the core AJAX controls included in ASP.NET 3.5. Additional controls are available in the ASP.NET AJAX Control Toolkit. The UpdateProgress Control The UpdateProgress control is a visual companion to the UpdatePanel control. Pages that host UpdatePanel controls display special content elements while an update is in progress—for example, an animated GIF showing a progress bar or a clock with spinning hands. The idea of the UpdateProgress control is to let the user know that page is working. In a long running process, even using an UpdatePanel will not speed up the server processing time. An UpdateProgress control is a very simple way to let the user know to keep waiting. The UpdateProgress Figure 5: Partial-page loading with UpdatePanel controls Traditional update Postback Page content Entire Page Redrawn UpdatePanel update Callback UpdatePanel content Region Encapsulated in UpdatePanel redrawn
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.