I am checking if a user is authenticated, and need to direct to a different view if the user is not autheticated.
public ActionResult UserMaintenance()
{
if (User.Identity.IsAuthenticated)
{
return View();
}
else
{
LogOn.View; //// this is the area that needs help
}
}
I would like to present the user the view to enter the login and password….
thank you
You can use
RedirectToActionto any action in any controller.As you are using ASP.net MVC you can redirect it to
LogOnaction inAccountcontroller