本文介绍了表格的注销代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你可以在html中找到退出表格的代码,所以按下后退箭头没有人能看到我的账号。

Can u get me code for logout form in html so thst by pressing back arrow no one could see my account.

推荐答案


public partial class logout : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.Literal Literal1;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Literal1.Text = "<pre lang="c#">

;注销......;

Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));

Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetNoStore();

}

catch {}

}





protected void Timer1_Tick(object sender,EventArgs e)

{

试试

{

FormsAuthentication.Sig nOut();

Response.Redirect(helpdesk.aspx);

}

catch {}

}

}

;Logging out…";
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
}
catch { }
}


protected void Timer1_Tick(object sender, EventArgs e)
{
try
{
FormsAuthentication.SignOut();
Response.Redirect("helpdesk.aspx");
}
catch { }
}
}


protected void btnLogout_Click(object sender, EventArgs e)
       {

Session.Abandon();
Session.Clear();

Response.Redirect("main.aspx");
}


这篇关于表格的注销代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 06:56