title: Waiting on tasks in ASP.NET WebPages Razor view
body: <p>I am using async/await, and calling an async method from one of my views and I need to wait until it finishes. <a href="http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html" rel="nofollow">I've seen a lot of examples for ASP.NET MVC, where you can just put an "async" into the signature of your action.</a> But I haven't seen any examples for ASP.NET WebPages.</p>
  
  <p>Do I just call "Wait()" on the returned task inside my Razor view? I've seen recommendations against Wait().</p>
  
  <p>Please give me some references/examples on how to properly call async methods from within a Razor view in WebPages.</p>