Im implementing Web Form using ASP.NET in c#, I have a page with few TextBox and a Submit Button, the data from TextBox going to insert into Database when Submit Button is pressed, the page will be retain and no redirect is required.
However, there is a issue after the data has been submitted, if F5/refresh the page without click on the Submit Button, the data will insert again and again.
How can I avoid such issue happen after the first submission?
Thank you in advanced.
Place Response.Redirect to the same page after save logic done. This happens because browser repeat last request on F5 in you case this is POST request to save. After Response.Redirect last request will be GET and you problem will be solved