What am I doing wrong with the MVC code here? An Index view includes a form that represents to myself that I would like the controller to process the submitted form and then return to the view.
Actually the form is processed correctly, but the returned view looks as if nothing is happening (for example, identifiers that have been deleted are still displayed). If I refresh the page manually, it displays correctly again. I don’t think that this is due to broswer caching, since redirecting to the same view from another controller works fine. How can i fix this?
public ViewResult Index()
{
return View(GetComments());
}
[HttpPost]
public ActionResult Index(int[] AllIds)
{
if (AllIds != null)
{
foreach (int id in AllIds)
{
}
}
return RedirectToAction("Index");
}
: " (F11)". return RedirectToAction("Index"); }.