user3386436
user3386436

Reputation: 39

Adding a form to a web service

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:

enter image description here

Upvotes: 0

Views: 107

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222682

Click References->Add Service Reference Then a dialog will appear as follows,

enter image description here

Then create the client as follows,

  sampleSvc.CommonDataClient _client = new sampleSvc.CommonDataClient();

You can access the method like this,

 _client.CreateTable();

Upvotes: 1

Related Questions