Click here to Skip to main content
15,070,974 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Ref: refresh parent page after close popup page in asp c# ?[^]

I have a page that opens a popup window, a button on the page will submit the page to docuSign, the page redirects to docusign. When the document is signed, and the user clicks finish. the page is then closed, however the parent page is not refreshed.

How do I get the parent page to refresh when the child page is redirected?

The parent is getting refreshed when the redirect occurs.

What I have tried:

<pre lang="Javascript">
        function RefreshParent() {
            if (window.opener != null && !window.opener.closed) {
        window.onbeforeunload = RefreshParent;

Updated 22-Apr-21 9:03am

1 solution

I solved this by putting the following script on the parent page.

<Script type="text/javascript">
       var win;
       function OpenPopup(id, mode) {
           if(mode === '1')
               win ="/Jobs/Extras/ProjectExtra.aspx?id=" + id, "List", "left=300, top=150,scrollbars=no,resizable=yes,width=860,height=680");
               win ="/Jobs/Extras/ProjectExtraInvoice.aspx?id=" + id, "List", "left=300, top=150,scrollbars=no,resizable=yes,width=860,height=680");

           return false;

       var timer = setInterval(function () {
           if (win.closed) {
       }, 1000);


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900