I have a form on a webpage that a user fills and and then presses the submit button to store the data into a database. The problem is that if the user presses the Refresh button on thier browser the data is posted a second time.
I have tried adding code that checks to see if the page was submitted already or not, but it is not working. What am I doing wrong? I can not redirect them to another page after submitting as this page sets certain panels to visible or not depending on whether or not there submission to the database was sucessful or not.
I set up a global variable called vSubmitted
In the Page_Load section I have the following:
If vSubmitted <> True Then
vSubmitted = False
Then down in my btnSubmit_Click subroutine I have:
If vSubmitted = False Then
vSuccess = fnStoreData()
vSubmitted = True
But, a refresh is still submitting the data again. Trace shows vSubmitted set to false when the page reloads.
I know that this type of question has been posted before, but I am not getting anywhere with what I have been able to find.
Thanks in advance,