[ACCEPTED]-Post/Redirect/Get Pattern in ASP.NET MVC-post-redirect-get

Accepted answer
Score: 14

The way you're doing this is fine, but it 5 looks like you might be overthinking it 4 a little bit. Do your POST actions take 3 form posts from more than one form? If 2 not, why bother with a hidden form field? You 1 could get away with a simple RedirectToAction("MyAction")

Score: 4

Typically, an action that handles a POST 3 knows where it needs to redirect upon successful 2 submission. Therefore, each action that 1 implements RGP can simply invoke RedirectToAction(string).

public ViewResult Edit(string email)
{
  // save the email
  return RedirectToAction("Edit");
}

More Related questions