日期:2014-05-19  浏览次数:20446 次

为什么第二次打开模式窗口,它不能触发private void Page_Load(object sender, System.EventArgs e)事件呢?
为什么第二次打开模式窗口,它不能触发private   void   Page_Load(object   sender,   System.EventArgs   e)事件呢?

------解决方案--------------------
浏览器缓存
------解决方案--------------------
这应该是缓存的问题,在打开的URL后面加个随机数,
如 A.aspx?R=12345646 , "A.aspx?R= "+Math.random()
------解决方案--------------------
Response.Cache.SetCacheability(HttpCacheability.NoCache)
------解决方案--------------------
<base target= "_self "/>
<meta http-equiv= "Expires " content= "0 " >
<meta http-equiv= "Cache-Control " content= "no-cache " >
<meta http-equiv= "Pragma " content= "no-cache " >
在aspx文件里加上这个就行了。
------解决方案--------------------
Page_Load()
{
Response.Expire = -1
}
------解决方案--------------------
学习一下。
个人认为还是
<base target= "_self "/>
<meta http-equiv= "Expires " content= "0 " >
<meta http-equiv= "Cache-Control " content= "no-cache " >
<meta http-equiv= "Pragma " content= "no-cache " >
在aspx文件里加上这个就行了。
这个方法好
------解决方案--------------------
以上方法均可
------解决方案--------------------
缓存问题,但不完全说是客户端缓存, 服务器缓存也很大可能。

<%@ OutputCache Duration= "1 " VaryByParam= "* " %>

第一行,把缓存时间设短