Click here to Skip to main content
15,908,674 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
How to disable browser back button in asp.net? I have affected lot of prblems.
Please let me know about this.


Thanks in advance
Posted

Hi , please read this article , link
 
Share this answer
 
Comments
24983 28-Dec-12 5:21am    
Thanks Its working
Oleksandr Kulchytskyi 28-Dec-12 5:24am    
So, accept the solution if it was helpful, please ;)
Following Tip will be of help to learn few things around it: Browser back button issue after logout[^]
 
Share this answer
 
First, the preachy bit: Don't. Trying to disable the user's back button is very bad practice, it's their machine not yours.
Second, the bad news: You can't do it, not 100% reliably. For starters it relies on Javascript, which can be switched off on the client side.
Third, a bit of advice: find another strategy. It would be better for your app to handle back button requests more gracefully.

There is a more thorough discussion than I can make here[^].


There are circumstance where you might feel this is appropriate (e.g. a requirement that you can't budge, an intranet app where the cure would be worse than the disease) you can take a look at this article[^] (which is worth a read anyway). Even so, I'd avoid disabling the back button pretty hard.
 
Share this answer
 
Comments
24983 28-Dec-12 5:21am    
Thanks Its working
Ask Microsoft and all other providers of your web browsers to make it disable for you as you can not "disable" it programmatically.
 
Share this answer
 
Comments
24983 28-Dec-12 5:21am    
Thanks Its working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900