title: Update listBox on Main page from button click event on child window.
body: <p>I have a Main page that contains a listBox.</p>
  
  <p>When a user selects a profile form the list box, this opens up a child window called <code>pWindow</code>.
  This window as the option to delete the current profile via a hyperlink button that opens up a another confirmation window called <code>dprofile</code>.</p>
  
  <p>My question being is it possible that once a user has confirmed to delete the current profile they are in, and confirmed it in the button click on <code>dProfile</code>, how can I update the listBox in the first Main page so that the list no longer contains the deleted profile (which it is not doing at present.</p>
  
  <p>In the <code>dProfile</code> window I have created an event -</p>
  
  <pre><code>public event EventHandler SubmitClicked;
  </code></pre>
  
  <p>Where in the OK button click I have-</p>
  
  <pre><code>private void OKButton_Click(object sender, RoutedEventArgs e)
  {
    if (SubmitClicked != null)
    {
        SubmitClicked(this, new EventArgs());
    }
  }
  </code></pre>
  
  <p>So on the Main page I have added-</p>
  
  <pre><code>private void deleteProfile_SubmitClicked(object sender, EventArgs e)
      {
          WebService.Service1SoapClient client = new WebService.Service1SoapClient();
  
          listBox1.Items.Clear();
          client.profileListCompleted += new EventHandler&lt;profileListCompletedEventArgs&gt;(client_profileListCompleted);
          client.profileListAsync(ID);
      }
  </code></pre>
  
  <p>I thought this may have updated the listBox as it was confirmed in the <code>dProfile</code> form however when the form closes, the listBox stays the same and I have to manually refresh the webpage to see the update. How can I do this?</p>