title: How to update UI immediately when running an async task
body: <p>I have an Asp.Net 4.5 webforms application with a report which I'm trying to run using async await. Here is an example of the code I'm using:</p>
  
  <pre><code>protected async void btnReport_Click(object sender, EventArgs e)
  {
      lblStatus.Text = "Working!";
      await LongRunningTask();
  }
  
  private async Task LongRunningTask()
  {
      await Task.Delay(5000);
      lblStatus.Text = "Done!";
  }
  </code></pre>
  
  <p>Everything I've read seems to suggest that the first method should complete immediately and update the label but this is not the case. The method still ties up the UI until LongRunningTask completes. If I remove async and await from btnReport_Click the UI is updated immediately but then I get an unhandled exception with no specific information when LongRunningTask completes. Please let me know what I am not understanding here.</p>