Page Refresh Problem
-
I am using ASP.NET first time. i dont know much about dealing all this stuff. Problem i am facing is whenever i press F5 from my keyboard a codebehind my USERCONTROL's Submit button is automatically fired and it saves the previous data again into DB (i am astonished from where it gets previous data as i am making the fields empty after insert**
R A M
**
-
I am using ASP.NET first time. i dont know much about dealing all this stuff. Problem i am facing is whenever i press F5 from my keyboard a codebehind my USERCONTROL's Submit button is automatically fired and it saves the previous data again into DB (i am astonished from where it gets previous data as i am making the fields empty after insert**
R A M
**
When you press F5, the browser resends the last request to the server, and the request contains the form data from when the request was originally sent. You can avoid this by making a redirect after you have saved the data. That will make the browser request the page that you specify, so the last request will be that one, not the request containing the form data. --- b { font-weight: normal; }
-
When you press F5, the browser resends the last request to the server, and the request contains the form data from when the request was originally sent. You can avoid this by making a redirect after you have saved the data. That will make the browser request the page that you specify, so the last request will be that one, not the request containing the form data. --- b { font-weight: normal; }
Thanx alot ... I got it now ... infact there are many more solution i have read in an article... like viewstate..etc... Thanx alot anyways**
R A M
**