mardi 14 avril 2015

RedirectToAction not working in ASP.NET MVC 5

In my ASP.NET MVC 5 project, I have an ActionResult XXX and an ActionResult YYY. XXX redirects to Action YYY.



public ActionResult XXX()
{
//Some Code
return RedirectToAction("YYY");
}

public ActionResult YYY()
{
return View();
}


The ActionResult XXX is called from my HTML form.



<form
action="~/Home/XXX" method="post" enctype="multipart/form-data"...
</form>


The control reaches ActionResult YYY but the corresponding View doesn't get rendered. YYY works perfectly when called from other ActionResults.


Am I missing something here?


Aucun commentaire:

Enregistrer un commentaire