views:

82

answers:

1

I'm developing an ASP.NET 3.5 application which uses AJAX via the UpdatePanel control. I'm also using History Points to manage the browser back-button functionality. This all works fine until I want to navigate away from the page and back.

Within the page I'm clicking on a standard hyperlink which opens another page in my application. When I click the back button from that page though it briefly shows what was there on initial page load before my ScriptManager Navigate server-side function is called to handle the history. Does anyone know why this may be occurring? I am using master pages if that makes any difference.

I've tested in both IE7 and Firefox - it occurs in both although for a short time in Firefox. The time it's taking is under half-a-second but is noticeable.

A: 

See my answer here, http://stackoverflow.com/questions/648250/how-to-back-button-support-ajax/649094#649094

nickyt
So does that mean that it isn't possible to stop this occurring using the history control?
Nick
@Nick, you can use the history control or if you want to do it yourself, you just need to change your URL using anchors, e.g. http://somesite.com/Default.aspx#someAnchor so that it gets added to the browser history.
nickyt
Ok - I understand that the anchor is used to create history points. Are you saying that due to the way browsers handle anchors that the behaviour I'm seeing is normal when navigating back to an ajax page and that there's no way to prevent the old content showing up briefly?
Nick