I am using a session variable to store a value that added when a person goes through multiple pages on a form, basically a scorecard. If the person hits the Back button to redo a value, how do I restore the original value before they hit submit again? Right now the old value and the new value are being added together.
thanks
You need to "disable" the browser's Back button's functionality so that it does not load the page from the browser cache but hits the same page again. See this post for details:
http://geekswithblogs.net/vivek/archive/2007/02/24/107148.aspx
So whenever user presses back button the page_load event will fire again and you can put the relevant session setting/modifying code there.
Hope this helps,
Vivek
You could store the value to be passed in a hidden form input. That way the value will always be what it was when the page was posted.
0 comments:
Post a Comment