日期:2014-05-17 浏览次数:20606 次
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";
------解决方案--------------------
清除所有缓存
protected void RemoveAllCache()
{
System.Web.Caching.Cache _cache = HttpRuntime.Cache;
IDictionaryEnumerator CacheEnum = _cache.GetEnumerator();
ArrayList
al = new ArrayList();
while (CacheEnum.MoveNext())
{
al.Add(CacheEnum.Key);
}
foreach (string key
in al)
{
_cache.Remove(key);
}
show();
}
------解决方案--------------------
可以在A页面加一个linkbutton
如<asp:linkbutton id="linkBtnPostBack" runat="server">
然后写一个脚本
脚本里面会去点击这个linkbutton
从B页面过去的时候调用这个脚本,页面应该就刷新了。
------解决方案--------------------