Introduction:
In this article,i am going explain about how to build a asynchronous webpages using async attribute in asp.net 2.0
and above versions.
Main:
The Isasync attribute helps you to create asynchronous webpages,
The new Async attribute on the @Page directive accepts a Boolean value to enable or disable asynchronous processing. The default value is false.
<%@ Page Async="true" ... %>
The AddOnPreRenderCompleteAsync Method
The AddOnPreRenderCompleteAsync method adds an asynchronous event handler for the page’s PreRenderComplete event. An asynchronous event handler consists of a Begin/End pair of event handler methods, as shown here:
AddOnPreRenderCompleteAsync (
newBeginEventHandler(BeginTask),
newEndEventHandler(EndTask)
);
The BeginEventHandler and EndEventHandler are delegates defined as follows:
IAsyncResult BeginEventHandler(
object sender,
EventArgs e,
AsyncCallback cb,
object state)
void EndEventHandler(
IAsyncResult ar)
IAsyncResult BeginEventHandler( object sender, EventArgs e, AsyncCallback cb, object state) void EndEventHandler( IAsyncResult ar) |
See this below simple program examble,I am created one webpage and fetching my rss feeds asynchronously,

For downloading this sample code click here
Conclusion:
Hope this helps,
happy Coding.
Thanks for sharing, I found this story, while looking for some downloads and ran across this site, useful comments and great points made.