How to prevent Browser from going Back to previous Page for an ASP.NET page?

(It Soft) #1

How can i disable the browser’s Back button functionality when user visits a specific ASP.NET page, thus preventing the user to go back to the precedent pages.

By the way; i tried setting session["session-id"] to null but it didn’t work at all, the button is not disabled.

I need both the Back Button and the “Backspace” Keyboard button disable, (i.e. the Entire back functionality should be disabled).

thanks for assistance.

(Arrowsoft.IT Srls) #2

Hi IT_Soft,
you have to use push and pop from history object state.

In this manner you can avoid browser history navigation by defining yourself the behavior for the next and previous button. Be carefull: refresh button is not programmable :wink:

Check new HTML specs here.

(Claim Consultants LLC) #3

yes agree with you, Its an easy way to do that …