I have a standard asmx webmethod, that when referenced creates the following method in the client proxy:
msr.SendAndReceiveAsync("Hello");
This is just an example, any method you generate with asmx automatically gets the Async method included.
I can call this method fine, what I can’t seem to get right is hook up the event handler.
Best examples I can find recommend this:
msr.SendAndReceiveCompleted += new EventHandler<AsyncCompletedEventArgs>(msr_complete);
}
private void msr_complete(object sender, AsyncCompletedEventArgs e)
{
}
This does not compile. What am I doing wrong?
The web reference should have generated a completed event handler similar to this for you to use: