The scenario is that an ASP.NET webforms page will call a web service in an async manner to make about 8 web service calls to various provid开发者_开发问答ers for data. I would like to run them in parallel to speed things up. I also need to wait for them all to come back before moving on.
What is the best way to achieve this? Please provide some code examples (I'm from VB).
Thanks!!!
For ASP.Net MVC...
Use an AsyncController
- Using an Asynchronous Controller in ASP.NET MVC (with examples)
For good ole webforms...
If you are using .Net 4 you might consider the Task Parallel Library. Otherwise you may need to just use the Async Pattern
- Task Examples
- Async Pattern to Tasks
精彩评论