Reputation: 77
Now i am in log in page and after entering the credentials my login page should redirect to another page, In this page i want to mention log out link button, when i click log out link button it should be redirect to login page,,Pls Help
Upvotes: 2
Views: 18965
Reputation: 14860
From within the action method you can call RedirectToAction
which has various overloads...
public ActionResult Login()
{
return RedirectToAction("ActionName", "ControllerName");
}
or simply call the Redirect
...
public ActionResult Login()
{
return Redirect("~/Home");
}
Upvotes: 5