Hi,
Am using VS 2005 C#
I'm calling a webservice Asynchronously on a form used to process a login.
If an exception is thrown from the webservice - if the service was called
synchronously obviously the try catch works. However how do I catch
exceptions when I call it Async? At the moment the exception is getting
moved up to the Parent Form which I dont want. Where can I on my form
capture any exceptions?
Much appreciated for any help
Gary Howlett
try{
LWS.DataService oWS = new LWS.DataService();
oWS.PerformLoginAsync(tUsername.Text, tPassword.Text);
oWS.PerformLoginCompleted += new
Leprechaun.Database.LWS.PerformLoginCompletedEvent Handler(oWS_PerformLoginCompleted);
}
catch (Exception ex){
MessageBox.Show(ex.Message, "Unable to Logon", MessageBoxButtons.OK,
MessageBoxIcon.Stop);
this.DialogResult = DialogResult.Abort;
}