0

I've seen some web sites like banking applications that prevent the user from using the back button. If I remember correctly, when you press the back button your session times out.

How can I do this?

Zesty
  • 2,922
  • 9
  • 38
  • 69
  • 3
    Let me recommend Post/Redirect/Get pattern use . Besides that just build in some safe guards for double posts. – John Hoven May 03 '11 at 11:11

2 Answers2

2

No, don't do that; don't surprise the user. The back button is there so it can be used. If that's a problem for you, find a way around it, not prevent it.

Use the Post/Redirect/Get pattern @benjynito mentioned in the comment.

Andreas Grech
  • 105,982
  • 98
  • 297
  • 360
1

You cant disable browser's back button just use that, I found here

Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
Community
  • 1
  • 1
Govind Malviya
  • 13,627
  • 17
  • 68
  • 94