多次打开 showModalDialog 窗口页后,Page_Load事件只执行一次?也不清楚为什么,当我执行以下这句话后,打开的ctrlImageSelectPage.aspx页,第一次打开有执行Page_Load,关闭后第二次以后就不执行了,这是为什么!?window.showModalDialog("ctrlImageSelectPage.aspx",imgObj,"status:false;dialogWidth:550px;dialogHeight:500px;edge:Raised; enter: Yes; help: No; resizable: No; status: No");

解决方案 »

  1.   

    <head>
    <base target="_self">
    </head>
      

  2.   

    模式页面被缓存了Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
    Response.Expires = 0;
    Response.CacheControl = "no-cache";
      

  3.   

    缓存了,或者加个参数
    function OpenD(urlD,widthD,heightD,sbarW)
    {
    thedate = new Date();
    if(urlD.indexOf("?") != -1)
    {
    urlD = urlD + "&time=" + thedate.getTime();
    }
    else
    {
    urlD = urlD + "?time=" + thedate.getTime();
    }

    rv = window.showModalDialog(urlD,window,"dialogWidth=" + widthD + "px;dialogHeight=" + heightD + "px;status=0;scroll=" + sbarW + "");

    if(rv == "True")
    {
    location.reload(true);
    }
    else
    {
    eval(rv);
    }
    }