Author: ronald_yoh | Posted on: 12/23/2009 6:14:54 PM | Views : 941

 Can someone please explain the purpose of AddOnPreRenderCompleteAsync?
i've tried to read few web sites but i just can't get my head around it.
the code i have implemented as follow but i don't see any benefit of using AddOnPreRenderCompleteAsync (the loading time is still 10 seconds):
protected override void OnInit(EventArgs e) { base.OnInit(e); Page.AddOnPreRenderCompleteAsync(BeginDoSomething, EndDoSomething); } IAsyncResult BeginDoSomething(Object sender, EventArgs e, AsyncCallback cb, object state) { Response.Write("<br> BeginDoSomething Fired at" + DateTime.Now.ToLongTimeString()); return LongRunner.BeginLongRunningTransaction(cb, state); } void EndDoSomething(IAsyncResult asyncResult) { Response.Write("<br> EndDoSomething Fired at " + DateTime. ...

Go to the complete details ...