首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

用window.open打开子页面时,怎么每次都重新加载子页面,而不是读取历史页面

2012-04-01 
用window.open打开子页面时,如何每次都重新加载子页面,而不是读取历史页面用window.open打开子页面时,如何

用window.open打开子页面时,如何每次都重新加载子页面,而不是读取历史页面
用window.open打开子页面时,如何每次都重新加载子页面,而不是读取历史页面。
因为有时会在子页面更新数据

[解决办法]
url后加一随机参数,不然会去读缓存
[解决办法]
#region 清空客户端页面缓存 
public static void ClearClientPageCache() 

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"; 

#endregion 

HTML code
 window.open("xxx.aspx?id=1&Value=" + xxx + "", "", "height=550, width=850, top=100, left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no"); 

热点排行