asp.net 子窗体应用

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

还没写完,买东西回来再写!!!!!!!!!!

 红色部分实现子窗体关闭后主窗体自动刷新。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章