1

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?

Community
  • 1
  • 1
Steven Zack
  • 4,984
  • 19
  • 57
  • 88

1 Answers1

0

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.

Bala R
  • 107,317
  • 23
  • 199
  • 210