6.6. Managing History Client-Side

So far you have seen how to add history points and handle the navigation event only from server-side code. When history points are used in combination with an UpdatePanel control, they provide an extremely easy way to manage history. But wrapping content in an UpdatePanel is not the only way to write an ASP.NET AJAX page. When an UpdatePanel refreshes, although the page does not fully reload, the entire page is still being posted back to the server. This is necessary for UpdatePanel to integrate seamlessly with the server-side page model. But often it is more efficient to incrementally update the page content in the more traditional AJAX style, by calling a Web service or other end point to fetch data, and to rebuild HTML on the client-side based on that data. Such a mechanism does not rely on ASP.NET postbacks, and so the ScriptManager's server-side APIs for managing history are not available. Thankfully, ASP.NET AJAX History supports a purely client-side approach as well.

Get Professional ASP.NET 3.5 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.