I am using async/await, and calling an async method from one of my views and I need to wait until it finishes. I've seen a lot of examples for ASP.NET MVC, where you can just put an "async" into the signature of your action (http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html). But I haven't seen any examples for ASP.NET WebPages.

Do I just call "Wait()" on the returned task inside my Razor view? I've seen recommendations against Wait().

Please give me some references/examples on how to properly call async methods from within a Razor view in WebPages.

Related posts

Recent Viewed