I have form data that I insert into a database when the user clicks on a submit button. The problem is that after the original submission if the user refreshes the page the form data will be resubmitted and thus inserted into the database a second time. How can I fix this?
Share
Use an appropriate mechanism to detect double posting.
I prefer to use the following so as to detect whether the underlying request is doubled posted or not.
In your button click event handler: