I had done some reading on ASP.NET AJAX throughout the year but hadn’t had a chance to apply it. On my current project a perfect opportunity presented itself. On one page there is a list of folders the user can choose from. When a folder is selected it displays a list of photos. Each time a different folder is selected this causes a postback and the entire page is refreshed causing that annoying flickering (like on MSDN when browsing methods and properties of a class…). Since the site is designed with a master page and following the advice in “ASP.NET in Action” I added the ScriptManager to the master page and wrapped the controls with an UpdatePanel. And Voilà! Wow effect guaranteed! I knew what to expect, but it was still amazing to watch. Très cool!
When using VSTS 2008 the Web.config file includes all the needed configuration settings. Enhancing an existing ASP.NET 2.0 application requires adding the new settings, detailed in the section Configuring ASP.NET AJAX on ASP.NET – AJAX.
Of course, there is more to ASP.NET AJAX than UpdatePanel, and on that to-do list I have the web method / page method approach to investigate.
Some of the articles I read on the topic (in MSDN Magazine):
- Perspectives on ASP.NET AJAX (http://msdn.microsoft.com/msdnmag/issues/07/02/CuttingEdge/)
- UpdatePanel Tips and Tricks (http://msdn.microsoft.com/msdnmag/issues/07/06/WickedCode/default.aspx)
- AJAX Application Architecture, Part 1 (http://msdn.microsoft.com/msdnmag/issues/07/09/CuttingEdge/)
There’s always something to learn from Jeff Prosise and Dino Esposito!
Leave a comment