Steven Zack
Steven Zack

Reputation: 5114

Browser navigation, back button issue

I want to know how you guys deal with back button issues in your web applications.

I can not forbid users to click back button on their browser, but when they hit it, the page code doesn't run. So writing in page_load() makes no sense.

I have searched online and found this link: Disabling Back button on the browser. It does not work for me. Any idea?

Upvotes: 1

Views: 307

Answers (1)

Bala R
Bala R

Reputation: 109027

There is no way to disable the back button. You can try to open your page/form in a new window so there would be nothing to navigate back to Normally, If I have a critical or lengthy form, I tend to maintain a dirty-flag and if the user starts entering something, the dirty-flag gets set and on save or submit it gets reset. You can use unload/beforeunload javascript event to see if the dirty-flag is set and ask for confirmation.

Upvotes: 0

Related Questions