Breaking News
Loading...
Monday 11 March 2013

Logout code for Asp.Net

For logout in your web site you have to clear all the session ,so write following code in "Logout" button click event:

protected void btnSend_Click(object sender, EventArgs e)
{
        Session.Abandon();
        Session.Contents.RemoveAll();
        System.Web.Security.FormsAuthentication.SignOut();
        Response.Redirect("LoginPage.aspx");
 }

See Also :


  Follow Me On Facebok

--
/\/ir@\/  <(.'.)>

0 comments:

Post a Comment

Thanks for comment

 
Toggle Footer