Data inserted once again after Refreshing the browser
-
Hi, After inserting the data I am clearing the textbox and dropdownlist. But when I press the refresh button in the browser once again the data is inserted. This happens not only for Insert but also for all are the event that happens last once again happens when browser refreshed. We are not using Ajax. Thanks,
Ashok
-
Hi, After inserting the data I am clearing the textbox and dropdownlist. But when I press the refresh button in the browser once again the data is inserted. This happens not only for Insert but also for all are the event that happens last once again happens when browser refreshed. We are not using Ajax. Thanks,
Ashok
try by setting the enableviewstate property of the controls to false
-
Hi, After inserting the data I am clearing the textbox and dropdownlist. But when I press the refresh button in the browser once again the data is inserted. This happens not only for Insert but also for all are the event that happens last once again happens when browser refreshed. We are not using Ajax. Thanks,
Ashok
Redirect to the same page using Response.Redirect() once you have successfully enter the data. This will prevent the refreshing in performing a postback.
-
Hi, After inserting the data I am clearing the textbox and dropdownlist. But when I press the refresh button in the browser once again the data is inserted. This happens not only for Insert but also for all are the event that happens last once again happens when browser refreshed. We are not using Ajax. Thanks,
Ashok
One easy way to handle this is to set a session variable the first time the page is posted. You can check for the presence of this on any refresh and if it already exists, prohibit posting of any information. Ranjit Viswakumar Professional Services Specialist HostMySite.com[^]