As websites become larger and more complex, developers need to incorporate navigational hints and menus to keep visitors from getting lost. ASP.NET 2.0 included controls for creating “bread crumbs” (how did I get to this page?) and site maps (how do I find that other page?). Most of the time you will want these features to be present on every page, and thus master pages are a great asset. If you change the site map or the control, you have to update only the master and all the other pages are “updated” automatically.

With Service Pack 1, ASP.NET 3.5 also includes a way to control a browser’s history list. This is useful if you use AJAX features of ASP.NET so you can offer users logical navigation in an AJAX-enabled page.

Customizing Browser History

Using ASP.NET AJAX to perform asynchronous postbacks makes the UI in a page lively and makes it possible for the page to communicate with the server in the background, without full postbacks. However, AJAX introduces a navigation problem that hasn’t been an issue in plain HTML pages or ASP.NET web pages. (Well, not much of an issue in ASP.NET pages, anyway.)

Consider an AJAX-enabled page that lets the user make various settings in various controls. The user selects an item in a listbox, and the page makes an asynchronous postback. He checks a checkbox, and there’s another asynchronous postback. He clicks a radio button, and there’s yet another asynchronous postback. Wait, no, the user decides that he didn’t mean to click that radio ...

Get Programming ASP.NET 3.5, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.