asp.net 子窗体应用
主窗体弹出子窗体代码
string s="<script language='javascript'>window.showModalDialog('WebForm2.aspx',window,'dialogwidth:150;dialoghigth:100px;help:no');window.location.href=window.location.href;</script>";
if(!this.IsStartupScriptRegistered("starup"))
{
this.RegisterStartupScript("starup",s);
}
子窗体<head></head>中加入<base target=_self>,
关闭子窗体
Button1.Attributes.Add("onclick","javascript:window.opener=null;window.close();");
还没写完,买东西回来再写!!!!!!!!!!
红色部分实现子窗体关闭后主窗体自动刷新。