VSLive! 2007: ASP.NET AJAX Under the Hood

Scott Cate illustrates how to implement key features of ASP.NET AJAX to a packed crowd at VSLive! San Francisco 2007.

AJAX to a packed crowd at VSLive! San Francisco 2007.
by Peter Varhol

Watch the video of the session! (Running time: 1 hour 2 minutes)

Scott Cate
President, Inc.

The VSLive! San Francisco 2007 session by Scott Cate on Microsoft's ASP.NET AJAX would have been standing-room only, except there wasn't room available to stand. Over 200 attendees were crammed into the conference room, making it one of the most popular breakout sessions at the event. Cate didn't disappoint the crowd, using only three content-free PowerPoint slides and five minutes before he drove directly into the code.

The key to ASP.NET AJAX on the client, according to Cate, is the use of the UpdatePanel control. By wrapping any control with the UpdatePanel, you make its data available to asynchronous updates. If the UpdateMode property of the UpdatePanel control is set to Always, then the UpdatePanel control's content is updated on every postback that originates from the page. This includes asynchronous postbacks from controls that are inside other UpdatePanel controls and postbacks from controls that are not inside UpdatePanel controls.

Cate illustrated this principle using a DataGrid control in an application. He wrapped a DataGrid control with an UpdatePanel in an ASP.NET 2.0 application and demonstrated that any updates to the grid did not require a refresh of the entire page. Rather, the update was processed asynchronously back to the server and the value alone was refreshed on the page.

You can use multiple UpdatePanel controls to update different page regions independently. When the page that contains one or more UpdatePanel controls is first rendered, all the content in the UpdatePanel controls is also rendered and sent to the browser. On subsequent asynchronous postbacks, the content of each UpdatePanel control might not be updated depending on the panel settings and on client or server logic for individual panels.

You can illustrate this principle in an example ASP.NET 2.0 page, by taking two identical controls and wrapping one of them in an UpdatePanel. Making the same change to both controls shows that the control using the UpdatePanel updates more quickly and seamlessly, without a page update. The other control requires a full page refresh, no matter how trivial the change.

The popularity of Cate's session says a lot about the growing popularity of AJAX among developers in general, and Visual Studio developers in particular. AJAX, which allows asynchronous updates through the use of scripting, is rapidly becoming a standard for usability in Web applications. Microsoft's ASP.NET AJAX framework provides you with an easier way of achieving this standard in Visual Studio—forget about manually writing scripts.

About the Author

Peter Varhol is the executive editor, reviews of Redmond magazine and has more than 20 years of experience as a software developer, software product manager and technology writer. He has graduate degrees in computer science and mathematics, and has taught both subjects at the university level.

comments powered by Disqus


  • Visual Studio 2019 for Mac v8.9 Ships with .NET 6 Preview 1 Support

    During its Ignite 2021 online event for IT pros and developers this week, Microsoft shipped Visual Studio 2019 for Mac v8.9, arriving with out-of-the-box support for .NET 6 Preview 1, which the company also released recently.

  • Analyst: TypeScript Now Firmly in Top 10 Echelon (Ruby, Not So Much)

    RedMonk analyst Stephen O'Grady believes TypeScript has achieved the rare feat of firmly ensconcing itself into the top 10 echelon of his ranking, now questioning how high it might go.

  • Black White Wave IMage

    Neural Regression Using PyTorch: Training

    The goal of a regression problem is to predict a single numeric value, for example, predicting the annual revenue of a new restaurant based on variables such as menu prices, number of tables, location and so on.

  • Microsoft Ships Visual Studio 2019 v16.9 Servicing Baseline Release

    Microsoft is urging enterprises and professional coders to standardize on the new Visual Studio 2019 v16.9, a servicing baseline release that's guaranteed to receive official support for an extended period.

Upcoming Events