zoukankan      html  css  js  c++  java
  • 模态子窗口不执行page_load

    模态子窗口不执行page_load 
    asp.net 模态窗口中开启的模态窗口是不执行page load的

                 即第二次打开模态窗口不执行page load

    实践证明。 

     网上找到的解决办法:

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

    解决方式
    这应该是缓存的问题,在打开的URL后面加个随机数, 
    如   A.aspx?R=12345646     , "A.aspx?R= "+Math.random()
    Response.Cache.SetCacheability(HttpCacheability.NoCache)
    3
    <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   
    }
     缓存问题,但不完全说是客户端缓存,   服务器缓存也很大可能。 

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

    第一行,把缓存时间设短
  • 相关阅读:
    centos 7 install
    sbt
    maven create project
    java异常个人理解
    (poj1094)Sorting It All Out
    stars
    Following Orders(拓扑排序)
    The House Of Santa Claus(dfs)
    Prime Path(bfs)
    Fence Repair(优先队列容器的应用)
  • 原文地址:https://www.cnblogs.com/xieon1986/p/2740862.html
Copyright © 2011-2022 走看看