Define an asynchronous task using the System.Web.UI.PageAsyncTask class. After the task is defined, and is registered with the page using the Page.RegisterAsyncTask(PageAsyncTask) method, the Page.ExecuteRegisteredAsyncTasks method can be invoked to begin the asynchronous task.
The Page.ExecuteRegisteredAsyncTasks method is automatically called at the point in the page processing when any registered asynchronous tasks, if they exist, are invoked for a non-asynchronous page. This automatic call to Page.ExecuteRegisteredAsyncTasks occurs just before the Page.PreRenderComplete event. Call the Page.ExecuteRegisteredAsyncTasks method for tasks you want to be invoked at times other than the automatic call to this method. Note, asynchronous tasks will be executed only once even though Page.ExecuteRegisteredAsyncTasks may be called more than once.
The Page.AsyncTimeout property is reset on every call to the Page.ExecuteRegisteredAsyncTasks method. The last value of the Page.AsyncTimeout prior to invoking the Page.ExecuteRegisteredAsyncTasks method takes precedence. If an asynchronous task takes more than the Page.AsyncTimeout, subsequent tasks invoked during that Page.ExecuteRegisteredAsyncTasks call are timed out immediately.