我希望实现:用户点击超链接“退出”的时候,退出登陆(Logout)。   用什么方法实现呢?

解决方案 »

  1.   

    说的具体点阿。要实现什么效果?
    比如页面的结构,还有session或者cookie,说得具体点。
      

  2.   

    用户登陆系统,使用完毕之后,点击“Logout”的链接,退出登陆系统。我仅仅需要实现这样的功能。
      

  3.   

    private void Button2_Click(object sender, System.EventArgs e)
    {
    System.Web.Security.FormsAuthentication.SignOut();
    Session.Abandon();
    //Response.Redirect("../../../Default.aspx");
    }
      

  4.   

    private void SignOut_Click(object sender, System.EventArgs e)
    {
    FormsAuthentication.SignOut();
    if (Session["currentUser"] != null)
    Session.Abandon();
    Response.Redirect("/WISH/default.aspx");
    }