Registers beginning and ending event handler delegates that do not require state information for an asynchronous page.
- beginHandler
- The delegate for the System.Web.BeginEventHandler method.
- endHandler
- The delegate for the System.Web.EndEventHandler method.
Use the Page.AddOnPreRenderCompleteAsync(System.Web.BeginEventHandler, System.Web.EndEventHandler) method to add handlers to an asynchronous Web page.
You can register multiple asynchronous handlers; however, only one handler runs at a time. If you want to process multiple asynchronous methods simultaneously, you should use a single System.Web.BeginEventHandler method and launch multiple asynchronous operations from that handler.
The asynchronous handlers are called between the Control.PreRender and Page.PreRenderComplete events.
First, all System.Web.UI.Page events (through the Control.PreRender event) are run, and then each registered System.Web.BeginEventHandler method is called. When the handler completes, the corresponding System.Web.EndEventHandler method is called. If there are multiple asynchronous handlers, the next handler is called.
After the registered asynchronous event handlers have been called, the rest of the page events are called, beginning with the Page.PreRenderComplete event.