I have a windows application which have much intraction with the webservices. so I use backgroundworkers to make connection with webservices. I mostly handle DoWork and RunWorkerCompleted events to get the data in one and set in the other. and application is in debuging step now.
Just assume that the user loose the connection to internet when a backgroundworker is trying to connect to the server. I can catch the error but It's not enough. I also want to prevent RunWorderCompleted event if the worker could not get the right data from the internet. but I don't know how! throwing exceptions from worker's thread to the current thread seems imposible (tried it unsuccessfully) canceling the worker will not prevent RunworkerCompleted event to run. I am sure that every one who have experience to make such a program would use multi threads but I dont know how to handle the errors like this...
thank you in advance
regards