ASP.NET MVC: Is it possible to send error data to a non-POST page?
Since POST request is separate, I have to do all t开发者_Go百科he stuff I already did in a GET request again. So is it possible to redirect to the same page, but as a GET request?
I know it's kinda confusing...
[HttpPost]
public ActionResult Foo(...) {
...
return View("Foo", modelWithErrorsData); // Returns POST, I need GET
}
How about RedirectToAction()
?
return RedirectToAction("Err", model);
精彩评论