In my ASP.NET MVC 5 project, I have an ActionResult
SaveUploadedFile
and an ActionResult
Dashboard
. SaveUploadedFile
redirects to Action
Dashboard
.
public ActionResult SaveUploadedFile()
{
//Call to WEB API
...
...
//On Success of API
if (results.payload.success == true)
{
return RedirectToAction("Dashboard");
}
throw new HttpException(403, "Something happened");
}
public ActionResult Dashboard()
{
return View();
}
The ActionResult XXX
is called from my HTML form.
<form action="~/Home/SaveUploadedFile" method="post" enctype="multipart/form-data" class="dropzone" id="dropzoneForm"></form>
The control reaches ActionResult Dashboard
but the corresponding Dashboard View
doesn't get rendered. Dashboard
works perfectly when called from other ActionResults
.
Am I missing something here?
Aucun commentaire:
Enregistrer un commentaire