Reputation: 752
I want to redirect to a new page after login. However it does not work.
here is my code for the login check.
[HttpPost]
public ActionResult Index([Bind] EmployeModel employe)
{
bool employeExiste = employe.LoginCheck(employe);
if (employeExiste)
{
return RedirectToAction("../InventoryLocation/Index");
}
else
{
TempData["msg"] = "Your password is wrong!";
return View();
}
}
Here is my 404 error.
I am new to mvc what am I missing? Thank you for your help.
Upvotes: 0
Views: 295
Reputation: 298
change return value to:
return RedirectToAction("Index","InventoryLocation");
and check InventoryLocation to ininheritance Controller
Upvotes: 2