Click here to Skip to main content
15,915,081 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to enable/trigger page postback event on the click of browser back button of IE.
There is a problem with few of my page controls as they are loosing values when User click back button and reaches to previous page.

So i have written code on page load to again bind the value from database but browser back button not triggering page load on click.


Please advise.
Posted
Updated 8-Apr-19 3:29am

1 solution

Hi,
I don't think you can have a event on Back Button Click on the current page, but the previous page will load back. And you cannot disable back button of the browser. But I would suggest that, on click of back button, just ask the use to login again. refer below articles to achieve this:
How to disable browser's back button[^]

hope it helps.
 
Share this answer
 
Comments
chandrayog.2 24-Oct-13 5:28am    
the problem is that i have used TextBoxWatermark ajax control for my controls and their values are not caching in browser so on back click it does not retrieve controls previous values. so TextBoxWatermark may be the reason, any suggestion???
Karthik Harve 24-Oct-13 5:58am    
Thing is, we do'nt have control on browser buttons. so, we need to handle such a way that, there should not be harm to application business logic. Try to set the watermark on load or check which event can be used, client side or server side.

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