Tales from the Evil Empire

Bertrand Le Roy's blog

News


Bertrand Le Roy


Add to Technorati Favorites Tales from the Evil Empire - Blogged

Blogs I read

My other stuff

Archives

Fixing the back button in Atlas

Nikhil has an excellent prototype that adds browser history management to UpdatePanel. The two things I like the most about this sample are the simplicity of the API and that it goes beyond just restoring the back button and bookmarkability.

The simplicity is brought by a very clean server-side, event-based model. All the complexity of client-side history management is hidden by the server-side API. Basically, you add state changes to the history from the server-side events that are triggered by the changes you want to keep track of, and you restore this very same state from another server-side navigation event. It can't get any simpler than that.

The way in which this goes beyond simply restoring the back button and bookmarkability is that *you* now decide which state changes should be considered navigation. So from a state of things where you had lost the back button, we end-up in a place where the back button makes a lot more sense than with ordinary postbacks. Furthermore, with postbacks, you never really had bookmarkability: saving a bookmark from a postback page did not save the POST state so what you bookmarked was not the stateful page, it was the page in its initial state.

Check it out:
http://www.nikhilk.net/Entry.aspx?id=139

Comments

ナオキにASP.NET(仮) said:

nikhilk.net と Atlas and more と ScottGu's Blog からです。 Back Button Support for Atlas UpdatePanels ( nikhilk.net

# September 22, 2006 4:54 AM

ASP.NET Chinese Blogs said:

[来源:Bertrand Le Roy] 传统的web应用一般含有多个页面,用户在浏览时,浏览器地址框里的地址会随着页面的变动而更新。用户可以bookmark页面把网页地址收藏,之后通过收藏夹里的地址回到同个页面。用户在网站浏览时,也可以使用浏览器的向前/向后按钮来回访问多个网页。

# September 23, 2006 5:10 PM