Hi Guys,
Have been looking at this for a while and not sure if there is a solution but hopefully someone can point me in the right direction:
The problem is essential I want to undo an update if the user unloads a page but not if they just refresh the page.
Detail:
I have 2 asp pages.
Page 1 solicits some information and updates the database. This information is then posted to Page 2, where further details are entered and a final update is done. If however the user does not confirm the update on Page 2 and unloads the page I undo all updates by calling a function in the OnUnLoad event. This works fine but the problem is this function is also called if the user just does a Refresh on page 2.
In Summary:
Page 1, enter information,
Submit and Update the Database
Post details to Page 2
Enter more information on Page 2 and complete the update.
If Page 2 is unloaded OnUnLoad function is called and all updates are cancelled.
Problem: If Page 2 is refreshed, the the OnUnLoad event is also called and updates are also cancelled.
Any help would be appreciated.
Thanks.