How to Call Web Service Methods Asynchronously From an ASP.NET Page Using the Event-Driven Method in ASP.NET 2.0 and Higher
If you wanted to call a web service method asynchronously from an ASP.NET page in ASP.NET 1.x, you had two options: you could either use thread-blocking, or a callback method. With thread-blocking, you had to be mindful of the affect on other threads, and if you were using a callback method, you had to take steps to make sure that the page load didn't complete before the callback method was executed. In ASP.NET 2.0 and above, however, you have another option, which uses an event to signal that the asynchronous call has completed. It's easy, and even better, the page load won't complete until the event occurs. Here's how to use this convenient functionality. First, add the Async attribute to the Page directive that will be making the web service call, and set it's value to true, as shown below. This will allow the page to process asynchronously. <%@ Page Language="C#" Async="true" AutoEventWireup="true" CodeFile="Default.a