Hi everyone,
So basically in my UserController.cs class I have an Index method that returns the ActionResult to display the dashboard for the user. On this page is a html button with a type of submit. When I hit this button I want to capture it on the server side log the user out.
How can I do this since I'm not passing information back and the method signature ends up being the same.
Thanks,
Mike
[Authorize]
public ActionResult Index()
{
return View();
}
[Authorize]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index()
{
FormsAuthentication.SignOut();
return RedirectToAction("Index", "Home");
}