My Page structure
I have 3 textboxes in which i have client validation enabled.
I have submit button to post the form data.
Issue
When i click on submit button then it will go to my Post method, suppose i have not entered value in textbox then it throws me error from server side (Http Post).
Now i will enter the value in textbox then i will refresh the browser, it entering into Post method instead of Get !!!
Any help on this ??
This is the default behaviour for a browser which reissues the last request on refresh which in this case happens to be a POST.
If you are looking to prevent a re-POST on refresh you should implement the PRG (POST-Redirect-GET) pattern in MVC. This is where the Controller which receives the POST redirects using a GET request after processing. Thus the last browser request is a GET which will be reissued upon refresh.