problem When Refreshing a page
-
Dear All, Recently i noticed a problem .Simply the problem is i two text boxes for regno and Name and a button to save . I wrote code for saving data in button Click event. That works fine. Once i saved a data and then refresh the page the data is again saving. that means when refreshing the page button click event also executing. This creats many problem in our project. so many double entries occured. How can avoid it.? (one solution is check same data is present in the database before inserting. But this is not practicably apply for my cases) Please help me.......... Urgent (if u didn't understand our problem please contact me meetbinu2003@gmail.com)
-
Dear All, Recently i noticed a problem .Simply the problem is i two text boxes for regno and Name and a button to save . I wrote code for saving data in button Click event. That works fine. Once i saved a data and then refresh the page the data is again saving. that means when refreshing the page button click event also executing. This creats many problem in our project. so many double entries occured. How can avoid it.? (one solution is check same data is present in the database before inserting. But this is not practicably apply for my cases) Please help me.......... Urgent (if u didn't understand our problem please contact me meetbinu2003@gmail.com)
Just give Response.Redirect to the same page soon after the Insert. This problem is there for deletes also, so it is a good practice to give response.Redirect soon after the opertion, so that the viewstate is cleared.