I tried using a RedirectToAction
after I have done a post to the controller and saved but the URL does not change and the redirect does not seem to work. I need
This is a bit late.... but I had the same problem in MVC5. I had 2 actions with the same name, which is common enough. I wasn't getting any errors that I could capture in Application_Error or OnException in the controller. I tried adding in the action, controller, area in the RedirectToAction route variable to no avail. I ended up renaming the POST action to EditPost and everything works now for me. Hope this helps.
public ActionResult Edit(int id)
{
return View();
}
[HttpPost, ValidateAntiForgeryToken]
public ActionResult Edit(MyInputModel myInputModel)
{
return View();
}
public ActionResult Create()
{
return RedirectToAction("Edit", new {id = 1});
}