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

不刷新:

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

你可能感兴趣的:(.net,asp.net,asp)