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