Click here to Skip to main content
14,325,028 members
Rate this:
Please Sign up or sign in to vote.
See more:
Silverlight Tutorial: Creating a data centric web app with DataGrid, LINQ, and WCF Web Service[^]


At this Article What is DemoServiceClient i dont know

private void OnSubmitBtnClick(object sender, RoutedEventArgs e)<br />
{<br />
    DemoServiceClient webService = new DemoServiceClient();<br />
<br />
    webService.InsertDataAsync(TestItem1TxtBox.Text, TestItem2TxtBox.Text);<br />
}




Please help me.
Posted
Updated 7-Jul-10 2:59am
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

That appears to be the proxy to the webservice. However post this question in the article and the author might be able to guide you further.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

That is the Web Service Proxy reference Class for Communicating the WebServer :)
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

Hi,

DemoServiceClient is the proxy generated by the Visual Studio IDE when you are adding the service reference.

Suppose, you have a WCF service named "MyService" and you added the service reference to your project, it will generate the proxy class in that project to give you easy access to the service contract.

You can then call the methods inside the class i.e. the service call by using this:

DemoServiceClient webService = new DemoServiceClient();<br />
...<br />
...<br />
webService.InsertDataAsync(TestItem1TxtBox.Text, TestItem2TxtBox.Text); // assume this is the service call
   
v2
Comments
Member 1227638 18-Oct-10 18:55pm
   
is there any namespace that we need to use ? because DemoServiceClient thing is not intellisensed by the compiler.
Kunal Chowdhury «IN» 18-Oct-10 21:23pm
   
You have to specify the full namespace of your client. So, first check what is the namespace for your client class. Check using the object browser.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100