Friday, March 25, 2011

Back Button Disable

home.aspx.cs


protected void Page_Init(object Sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
        Response.Cache.SetNoStore();
    }


 protected void lnk_logout_Click(object sender, EventArgs e)
    {
        Session["User"] = null;
        Response.Redirect("Default.aspx");
    }

No comments :

Post a Comment