• 检查session判断用户是否退出登录


        protected void Page_Load(object sender, EventArgs e)
    {
    if (Session["UserID"] == null)
    {
    Page.RegisterStartupScript(
    "Edit", "<script>alert('由于你长时间没有操作该页,系统超时,已自动注销!请重新登录!');window.location.href='http://www.cnblogs.com/Default.aspx';</script>");
    //Page.ClientScript.RegisterClientScriptBlock(typeof(string), "my", "<script>alert('由于你长时间没有操作该页,系统超时,已自动注销!请重新登录!');window.location.href='../Default.aspx'</script>", true);

    }
    }
    protected void lnkBtnExit_Click(object sender, EventArgs e)
    {
    Session.Clear();
    Response.Redirect(
    "http://www.cnblogs.com/Default.aspx");
    }
  • 相关阅读:
    history对象
    排序算法总结
    Boltzmann机
    Sort Colors
    First Missing Positive
    Sort List
    Insertion Sort List
    Merge Two Sorted Lists
    Merge Sorted Array
    Sum Root to Leaf Numbers
  • 原文地址:https://www.cnblogs.com/lushuicongsheng/p/1905758.html
Copyright © 2020-2023  润新知