title: ASP.NET: Programmatically fire a server-side event in window.opener with JavaScript
body: <p>I have a DropDownList that fires off some server-side databinding in its OnSelectedIndexChanged event.</p>
  
  <pre><code>&lt;asp:DropDownList ID="ddlGroup" runat="server" 
       AutoPostBack="True" OnSelectedIndexChanged="SelectGroup" /&gt;
  </code></pre>
  
  <p>Elsewhere in the page, some JavaScript opens a popup. When the popup is filled out and submitted, I want to use JavaScript to fire that <code>OnSelectedIndexChanged</code> event in the opener page. I found some other code that does something similar:</p>
  
  <pre><code>    if (window.opener != null ) {
      var cf = window.opener.document.forms['aspnetForm'];
          if (!cf) {
              cf =  window.opener.document.aspnetForm;
          }
          cf.__EVENTTARGET.value = "prAdded";
          cf.__EVENTARGUMENT.value = "winClosed";
          cf.submit(); 
      }
  </code></pre>
  
  <p>I think this is what I'm looking for, but I'm not sure what should go in the EVENTTARGET and EVENTARGUMENT parts, or even if I need those at all. I want to specifically fire the <code>OnSelectedIndexChanged</code> event handler for <code>ddlGroup</code>. Is this possible/practical?</p>
  
  <p>Secondary question: Can I make the parent page refresh AFTER I run server-side code in the popup?</p>