Hi,Im looking for disabling the browser back button after user has logout.The problem is the logout is in MASTER PAGE.
So far i have tried scripts, Session abandon() nothing works as per my requirement..pls help me with code.
Thanks.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
A KumarPosted Feb 26, 2014, 6:56 AM
----------------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Admin_MasterPage : System.Web.UI.MasterPage
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constring"].ConnectionString);
SqlCommand cmd;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "";
if (Session["username"] == null)
{
Response.Redirect("Login.aspx");
}
}
}
Lakshmanan Sethu SankaranarayanPosted Feb 22, 2014, 2:23 AM