How to sign out using forms authentication?

  • Thread starter Thread starter Keith Selbee
  • Start date Start date
K

Keith Selbee

I want to have a logout button on my page and tried putting
FormsAuthentication.SignOut() behind it but it doesn't work. Anyone have
any ideas??



Keith
 
The call to SignOut can be followed by a Redirect to your logon.aspx page.

private void cmdSignOut_ServerClick(object sender, System.EventArgs e)
{
FormsAuthentication.SignOut();
Response.Redirect("logon.aspx", true);
}

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
 
Back
Top