Skip to content

Instantly share code, notes, and snippets.

@danielgreen
Created June 13, 2013 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielgreen/5772929 to your computer and use it in GitHub Desktop.
Save danielgreen/5772929 to your computer and use it in GitHub Desktop.
MVC tips - don't return a View from an HTTP Post action

A Post action should redirect to a Get action rather than returning a View. This avoids the annoyance of the browser displaying the "do you want to resubmit the form" message if the user tries to refresh the page after the Post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment