I'm using
ClientScript.RegisterStartupScript(this.GetType(), "pop", newWin, true); 
to open popup windows.
I have some code lines after this line. But I need to execute those code after closing the popup. Not immediately.
Any solution?
Button Click event:
 private void button_Click(object sender, EventArgs e)
        {
            string queryString = "WebForm2.aspx";
            string newWin = "window.open('" + queryString + "');";
            ClientScript.RegisterStartupScript(this.GetType(), "pop", newWin, true);
                ((Button)sender).Enabled = false;
        }
Button click Opens pop up page.
                        
You can use
OnClientClicklike this:-OR from code behind try this:-
OR