title: ASP.NET MVC - How to Preserve ModelState Errors Across RedirectToAction?
body: <p>I have the following two action methods (simplified for question):</p>
  
  <pre><code>[HttpGet]
  public ActionResult Create(string uniqueUri)
  {
     // get some stuff based on uniqueuri, set in ViewData.  
     return View();
  }
  
  [HttpPost]
  public ActionResult Create(Review review)
  {
     // validate review
     if (validatedOk)
     {
        return RedirectToAction("Details", new { postId = review.PostId});
     }  
     else
     {
        ModelState.AddModelError("ReviewErrors", "some error occured");
        return RedirectToAction("Create", new { uniqueUri = Request.RequestContext.RouteData.Values["uniqueUri"]});
     }   
  }
  </code></pre>
  
  <p>So, if the validation passes, i redirect to another page (confirmation).</p>
  
  <p>If an error occurs, i need to display the same page with the error.</p>
  
  <p>If i do <code>return View()</code>, the error is displayed, but if i do <code>return RedirectToAction</code> (as above), it loses the Model errors.</p>
  
  <p>I'm not surprised by the issue, just wondering how you guys handle this?</p>
  
  <p>I could of course just return the same View instead of the redirect, but i have logic in the "Create" method which populates the view data, which i'd have to duplicate.</p>
  
  <p>Any suggestions?</p>