public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["adminVALIDUSER"] == null)
{
Response.Redirect("adminindex.aspx");
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetAllowResponseInBrowserHistory(false);
Session.Abandon();
Session["AdminId"] = null;
Session["LoginId"] = null;
Session["adminVALIDUSER"] = null;
Session["AdminName"] = null;
Response.Redirect("adminindex.aspx");
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment