delegate d=new delegate(DeleMethod); delegate.BeginInvoke(new AsyncCallback(WorkCompleted), null);); protected void DeleMethod() { ClientScript.RegisterStartupScript(this.GetType(), "Sample", "javascript:msg('before executing delegate method');", true); Thread.Sleep(7000); ClientScript.RegisterStartupScript(this.GetType(), "Sample", "javascript:msg('after executing delegate method');", true); } protected void WorkCompleted(IAsyncResult result) { DelGetBack.EndInvoke(result); result.AsyncWaitHandle.Close(); ClientScript.RegisterStartupScript(this.GetType(), "Sample", "javascript:msg('waittttt');", true); DelGetBack = null; //DelGetBack.EndInvoke(result); }
Thread.Sleep
EndInvoke
DeleMethod
ClientScript.RegisterStartupScript
BeginInvoke
Threading
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)