我在母版页上有一个链接按钮“条款和条件”。当使用点击它时,会使用此代码显示弹出窗口
Dim myScript As String
myScript = "<script>window.open('Terms.aspx?',null,'height=750, width=1024,status= no,resizable= no, scrollbars=yes,toolbar=no,location=no,menubar=no'); </script>"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "pop", myScript, False)
我在弹出窗口页面上有一个接受按钮,我正在关闭这个弹出窗口
ClientScript.RegisterStartupScript(GetType(Page), "closePage", "window.close();", True)
问题是一旦关闭此弹出窗口,我想刷新父窗口。我怎样才能做到这一点?关闭弹出窗口后刷新父窗口不起作用
更新
<div style="padding:5px 0;">
<asp:Button ID="btnAccept" runat="server" Text="Accept" OnClientClick="Refresh()" style="HEIGHT: 19px;background: #C0003B;color: white; " /> <asp:Button ID="btnReject" runat="server" Text="Reject" OnClientClick="Refresh()" style="HEIGHT: 19px;background: #C0003B;color: white;"/>
</div>
function Refresh() {
return confirm('Are you sure?');
window.onunload = refreshParent;
function refreshParent() {
window.opener.location.reload();
}
}