Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string exti = Context.Request.QueryString["exti"];

        if (exti == "0")
        {
            //Session.Clear();
            if (Request.Cookies["userinfo"] != null)
            {
                PageBase.AddLog(new Logs()
                {
                    AddTime = DateTime.Now, Contents = "退出系统", IsDel = 1, TypeName = "退出", UserCode = PageBase.GetLoginCode()
                });
                HttpCookie myCookie = new HttpCookie("userinfo");
                myCookie.Expires = DateTime.Now.AddDays(-1d);
                Response.Cookies.Add(myCookie);
            }
        }
    }