write following code in page_load function of page to with you not want to be cached.
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
if (Session["SessionId"] == null)
{
Response.Redirect("loginpage.aspx");
}
Disable Page To Be Cached (disable back button of browser)
Labels: ASP.NET
Disable Page To Be Cached (disable back button of browser)
write following code in page_load function of page to with you not want to be cached.
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
if (Session["SessionId"] == null)
{
Response.Redirect("loginpage.aspx");
}
Labels: ASP.NET