ASP.NET 弹出的窗体关闭后刷新上级窗体

在新打开的窗体中加入如下代码即可

<body onunload="window.opener.location.reload();">

刚刚使用方法时发现会弹出提示框,后来查资料发现用

window.opener.location.href=window.opener.location.href;
即不会弹出

 

在Button事件中输入:

Response.Write("<script>window.opener.location.href=window.opener.location.href;window.opener=null;window.close();</script>");

posted @ 2009-03-19 17:33  邑尘  阅读(270)  评论(0编辑  收藏  举报