J
jediknight
I have a few processor intensive methods in my webservice which I need
to call from my web application.
After completion of these processes I need notification of whether
they were successful or not.
I can do this with delegates and by using BeginInvoke to update the UI
in a windows app but I can't
quite figure out how to do this in a web app.
This is what I have so far.
private void Button1_Click(object sender, System.EventArgs e)
{
AsyncCallback cb = new AsyncCallback(this.callback);
IAsyncResult ar = svcs.BeginProcess(this.TextBox1.Text, cb, svcs);
}
public void callback(IAsyncResult ar )
{
localhost.TestService svcs;
svcs = (localhost.TestService)ar.AsyncState;
bool reply = svcs.EndProcess(ar);
// Need to update UI
// #################
}
to call from my web application.
After completion of these processes I need notification of whether
they were successful or not.
I can do this with delegates and by using BeginInvoke to update the UI
in a windows app but I can't
quite figure out how to do this in a web app.
This is what I have so far.
private void Button1_Click(object sender, System.EventArgs e)
{
AsyncCallback cb = new AsyncCallback(this.callback);
IAsyncResult ar = svcs.BeginProcess(this.TextBox1.Text, cb, svcs);
}
public void callback(IAsyncResult ar )
{
localhost.TestService svcs;
svcs = (localhost.TestService)ar.AsyncState;
bool reply = svcs.EndProcess(ar);
// Need to update UI
// #################
}