Currently, I am working on implementing a web-based system and I am facing an issue. My main goal is to capture when the back button of a browser is pressed so that there is no postback action performed. I have come across various code snippets, however, none seem to effectively resolve this problem. Specifically, I have a home page where I would like the browser to postback if the back button is clicked.
To provide more context: When navigating from the Home page to x.aspx?Date=30.01.2012, I store the date in a session. Then, upon hitting the back button on the browser to return to the Home page, I want to retrieve the stored date from the session via postback.
window.history.go(-1)