Last post Sep 16, 2015 08:21 AM by Mukesh_Kumar
Sep 16, 2015 08:17 AM|Yaduveer Saini|LINK
I have a Web Forms application. I call WCF service which is hosted on IIS then
how can i access Class/Properties/DataMembers in (.aspx.cs) page which are contained in WCF Service.
Any help will be greatly appreciated.
Sep 16, 2015 08:21 AM|Mukesh_Kumar|LINK
You can use like this..First write the namespace for the wcf service.
and than you can simply do that like below to access the datacontract and datamember
using (ProductsClient client = new ProductsClient())
Product product = new Product();
product.CategoryID = "2";
product.CategoryName = "Condiments";
product.ProductID = "8";
product.ProductName = "Coffee";
product.UnitsInStock = "20";
product.WebOnly = ProductWebOnly.No;
Hope this will help you.