asp.net showModalDialog 打开新窗口刷新和不刷新父窗口的方法

来源:互联网 发布:如何缓解焦虑情绪 知乎 编辑:程序博客网 时间:2024/05/16 22:06

不刷新:

 this.button.Attributes["onclick"] = "var   obj = showModalDialog('outputchakan.htm','详细信息','dialogWidth:620px;   dialogHeight:520px;help:0;status:0;resizeable:1');   return false;";

 

 

刷新:

if (!ClientScript.IsStartupScriptRegistered("myScript"))
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript",
           "function NewWin() { showModalDialog('2.htm', '" + Label_Num.Text + "', 'dialogWidth:620px; dialogHeight:520px; status:0; help:0;scroll:no;resizable:yes'); }", true);
            }
            Button1.Visible = true;

         Button1.Attributes["onclick"] = "NewWin()";

原创粉丝点击