title: How to reload parent page on closing PopUp window?
body: <p>I have a linkbutton "terms and conditions "on a master page.. when use clicks on it a popup window is displayed  usingthis code </p>
  
  <pre><code>Dim myScript As String
  
              myScript = "&lt;script&gt;window.open('Terms.aspx?',null,'height=750, width=1024,status= no,resizable= no, scrollbars=yes,toolbar=no,location=no,menubar=no'); &lt;/script&gt;"
  
              ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "pop", myScript, False)
  </code></pre>
  
  <p>I have a accept button on pop up window page on which i am closing this pop up </p>
  
  <pre><code>ClientScript.RegisterStartupScript(GetType(Page), "closePage", "window.close();", True)
  </code></pre>
  
  <p>The problem is i want to refresh the parent window once this pop up is closed. How can i achieve this? 
  This did not work <a href="https://stackoverflow.com/questions/11398356/refreshing-parent-window-after-closing-popup">Refreshing Parent window after closing popup</a></p>
  
  <p><strong>UPDATE</strong></p>
  
  <pre><code>&lt;div style="padding:5px 0;"&gt;
        &lt;asp:Button ID="btnAccept" runat="server" Text="Accept"  OnClientClick="Refresh()" style="HEIGHT: 19px;background: #C0003B;color: white; " /&gt; &amp;nbsp;&lt;asp:Button ID="btnReject" runat="server" Text="Reject" OnClientClick="Refresh()" style="HEIGHT: 19px;background: #C0003B;color: white;"/&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>   function Refresh() {
         return confirm('Are you sure?');
         window.onunload = refreshParent;
         function refreshParent() {
             window.opener.location.reload();
         } 
     }
  </code></pre>
  
  <p></p>