I have created a two views in same controller. the issue is, i want to load second view after httppost is done.
Index View
public ActionResult Index()
{
return View();
}
HttpPost
[HttpPost]
public ActionResult Index(AccountModel model)
{
return View("NEXTVIEW");
}
Next View
public ActionResult NEXTVIEW(EpmloyeeModal model)
{
return View();
}
After HttpPost, I have added return to nextview. whereas it always return back to Index view. I tried to find such scenario on different websites, but could not find anywhere.
Thanks.
Try like this
[HttpPost]
public ActionResult Index(AccountModel model)
{
return RedirectToAction("NEXTVIEW");
}
For post action, use this:
[HttpPost]
public ActionResult Index(AccountModel model)
{
return RedirectToAction("NEXTVIEW");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With