Chapter 6. UpdatePanel: Refreshing Only Parts of a Page
A summary of Ajax advantages would most certainly include this description: “changes a section of a web page without performing a postback.” In previous chapters, you learned how to do this by retrieving data from the server and then using JavaScript and the DOM to use this data to populate an element on the page.
One very neat feature of ASP.NET AJAX is its ability to perform partial page updates. That means that one section of a page is updated, as with a page reload, but without a complete page postback/refresh. As an added bonus, no JavaScript is required (from the developer); ASP.NET AJAX takes care of that.
All of this magic is made possible by the ASP.NET AJAX UpdatePanel
control, which lets you confine postbacks to a particular area of a page, such as the input fields of a form. The UpdatePanel
control can, for instance, get data from a web service—such as a stock ticker or weather service—and periodically update results.
In addition to saving you a great deal of frustration, using this control can save you a lot of coding, testing, and debugging time as well. It is perhaps one of the most exciting features of the ASP.NET AJAX framework.
In this chapter, you’ll learn how you can use the UpdatePanel
control to cut down on postbacks of an entire page and improve the responsiveness of your application.
Making a Page Region Updatable
Not surprisingly, the ASP.NET AJAX control UpdatePanel
is the main theme of this chapter. Everything ...
Get Programming ASP.NET AJAX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.