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

原文地址:https://www.cnblogs.com/ceci/p/1416985.html