views:

975

answers:

1

I'm working on a mvc application that uses jquery to implement dynamically loading page content using jquery.load and/or jquery.ajax. But when the user uses the back button in these kind of applications, the result for the user is often unexpected. I've seen articles like RSH from google that claim to solve this problem, but I'm not sure how to make it work with the ASP.NET MVC framework in combination with jquery.

Does anyone have an example or explanation on how to implement Real Simply History (like google's RSH, jquery probably has also plugins for this) in ASP.NET MVC applications using jquery?

+2  A: 

There is a really (and I mean really) nice tutorial on the ASP.Net learning site which walks you through building an app from scratch, refactoring it to use some nice design patterns, basic unit testing and TDD.

In the last iteration they add AJAX functionality, including partial page loads with jQuery and using the Microsoft AJAX library to create browser history points. Check it out!

Tomas Lycken
This only works in firefox. You have to insert a special iframe for ie.<iframe id="__historyFrame" style="display:none;" ></iframe>
Malcolm Frexner
I would like to avoid using MS ajax library, as we've decided to use jquery for all Ajax (including partial post/partial updating)... jquery only solution would be preferable
rekna