在Page_load里面加入一下语句。
Response.Cache.SetNoServerCaching();
//显式拒绝在源服务器上缓存文档。设置后,将完全处理对文档的所有请求。调用此方法后,无法再为当前响应重新启用缓存。
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Response.Cache.SetNoStore();
转载于:https://www.cnblogs.com/huabei504/archive/2005/01/18/93578.html
博客介绍了解决使用缓存时Page_load只能运行一次的方法,即在Page_load里加入相关语句,如Response.Cache.SetNoServerCaching()拒绝源服务器缓存,SetCacheability设置为NoCache,SetNoStore()等,还给出了转载来源。
1940

被折叠的 条评论
为什么被折叠?



