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

還沒寫完,買東西回來再寫!!!!!!!!!!

 紅色部分實現子窗體關閉後主窗體自動刷新。

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