Author: sahajMarg | Posted on: 12/6/2007 12:00:53 PM | Views : 293

 Hello, my question is.
I have a form with some input fields and a submit button.

If user hits submit for the first time I do an insert into the dbase and if the user hits the submit second time I do an update.  the issue that I am having is that when the user clicks on the submit I hide all the forms panel and show thanks panel, but if the user hits the back button on the browser and goes back and hits the submit again it makes a duplicate entry into the dbase....basically if the user keeps on hitting the back button on the browser and keeps on hitting the submit button new entries will keep on getting created...how can I avoid thisbehaviour.
 
         if (ViewState["retrievalNum"] == null)
            {
                int chk = DoInsert();  &n ...

Go to the complete details ...