I have to get the result from a web service. This is what I used:
EDIT:
private void Button_Click(object sender, RoutedEventArgs e) { webService.WebServiceHuscSoapClient a = new webService.WebServiceHuscSoapClient(); a.InsertNewUserCompleted += a_InsertNewUserCompleted; a.InsertNewUserAsync("name", "phonenumber", "address"); } void a_InsertNewUserCompleted(object sender, webService.InsertNewUserCompletedEventArgs e) { MessageBox.Show(e.Result.ToString()); } Is there any way that I could put all this function and even handler to a class and when I want to get data from my webservice I would do something like this:
string json = MyWebService.GetData();