Unfortunately, those are the mechanics of HTTP. If you render something in response to a POST, then the user is free to POST it again.
The only two ways to work around this are:
- The result of the post should be a redirect, which will then cause the browser to issue a GET request.
- Don't have the original request be a POST, but instead be a GET (perhaps using Ajax).
To do the former, and still keep access to model information, you can use TempData (which survives a redirect).
|