在ASP.NET中有时候需要禁止从缓存取数据,我使用了如下代码让缓存无效
this.Page.Response.Cache.SetExpires(DateTime.Now);
this.Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
但随之问题就来了,当我save前做数据验证时,点击出现的验证提示后,出现“缓存过期”提示页。
不知谁有比较好的方法,既能让缓存无效,又让验证时不出现“缓存过期”的提示页?(不能用js来做验证)