title: Wait for asynchronous callback result
body: <p>I am performing an http web request which asynchronously gets a response from the server. I wish to perform actions on the result directly and do not wish to have any code running in the meanwhile. The reason it has to be asynchronous is that I am writing a silverlight application.</p>
  
  <p>Here is a code snippet</p>
  
  <pre><code>{
  ....
  
  request.BeginGetResponse(new AsyncCallback(Callback), request);
  
  //Some UI Code to be done after the callback 
  }
  
  private void Callback(IAsyncResult asynchronousResult)
  {
  //Code needed to be done before the UI code 
  }
  </code></pre>
  
  <p>But as soon as it reaches the async request it skips the callback and return to the calling function.</p>
  
  <p>Is there any way to be able to wait for the asynchronous request. I have tried using WaitOne() on the asynchronous result but it did not solve the problem.</p>
  
  <p>Thanks for the help!</p>