How to determine the client side when a page load is the result of an AJAX history point?

I am trying to prevent the “flicker” effect that occurs on my ASP.NET page, which occurs when the user navigates to the page through the back button after going from it. The reason for the flicker is because I am using the update panel, which has some of the content on the initial page load. As a result, when the page is loaded using the "Back" button, the initial content is displayed very briefly before it is updated with the corresponding history data.

To overcome this, I intend to use the hidden (updated) update panel (display: none) on the page to load, and then show it until we have a story. The problem is that I cannot find out what to check to determine if there is any story. I see that Sys.Application has a member_history, but when I check it on the init page, every time it is zero.

Does anyone know what I should check to determine if there is a story to work on the page load side? And at what point do you do this?

+5
source share
3 answers

The browser back button and the functions it provides are completely independent of the contents of your web page.

, , , , - , AJAX. . . # URL- , AJAX.

location.hash = 'foo';
+1

. div , none. Sys.Application window.location.hash, , /. , display , "display: none" .

ScriptManager Navigate, "", script, .

, , , . MS AJAX , .

0

, . , "" script , , . , .

0
source

All Articles