Click here to Skip to main content
15,904,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everybody

i am try to make browser back button to return to specific previous page. i was use javascript function inside my "v.aspx.cs" but it was not work. it was return me to the previous page directly not to home page of specific page that i can assign. what can i do???
Posted

1 solution

You should not redirect "Back", because it would greatly confuse the user. You should not break the most basic user expectations on navigation.

At the same time, you can disable "back" operation, which is the usual technique, there are many articles explaining how to do that. Please see: http://www.sitekickr.com/blog/back-button-browser-cache[^].

Alternatively (or additionally), you can handle the event "beforeunload" to notify the user and/or request confirmation:
https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload[^].

Perhaps if you explain the ultimate purpose, you can get other suggestions on what to do.

—SA
 
Share this answer
 
Comments
Badour alsamaraie 29-Jan-15 5:23am    
sorry i can not understand!
when i am disable back button it is not work. i want to make users press browser back put hundle direction

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