解决方案:
在Page_Load中添加
Context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
也可以添加个类BasePage (继承Page),在BasePage中添加,页面都继承这个类就可以了
本文介绍了一种在Page_Load事件中禁用HTTP缓存的方法,通过设置Context.Response.Cache.SetCacheability(HttpCacheability.NoCache)来实现。此外还提供了一个基类BasePage的建议,所有页面可以继承此类以统一管理缓存设置。
解决方案:
在Page_Load中添加
Context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
也可以添加个类BasePage (继承Page),在BasePage中添加,页面都继承这个类就可以了

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