Reputation: 39
I am trying to learn how to use methods from a web service into a C# form. I am following some examples, but i am confused on how exactly you add the reference from the form onto the web service and how can you use the methods from the Service.cs into the form's source code. I have left a picture to clarify what I need help understanding when it comes to how to properly link it:
Upvotes: 0
Views: 107
Reputation: 222682
Click References->Add Service Reference Then a dialog will appear as follows,
Then create the client as follows,
sampleSvc.CommonDataClient _client = new sampleSvc.CommonDataClient();
You can access the method like this,
_client.CreateTable();
Upvotes: 1