How To Prevent Caching of webform in ASP.NET

private void Page_Load(object sender, System.EventArgs e)
{
  if(!Page.IsPostBack)
  {
      Response.Cache.SetCacheability(HttpCacheability.NoCache);
      Response.Cache.SetAllowResponseInBrowserHistory(false);
  }
}

No comments:

Post a Comment