if you use master page then write this in page load
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
if (Session["SessionId"] == null)
{
Response.Redirect("login.aspx");
}
}
///
send some SessionId throw login.aspx