C# ASP.NET操作模态窗口时清除缓存

来源:互联网 发布:淘宝网宣纸系列产品 编辑:程序博客网 时间:2024/05/18 13:12

      放到PageLoad中

        HttpContext.Current.Response.Buffer = true;
        HttpContext.Current.Response.Expires = 0;
        HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
        HttpContext.Current.Response.AddHeader("pragma", "no-cache");
        HttpContext.Current.Response.AddHeader("cache-control", "private");
        HttpContext.Current.Response.CacheControl = "no-cache";

原创粉丝点击