문제

my teacher gave me a url to a webservice of my school with the purpose of extracting some data to help me with a project im making. the thing is he doesnt want to tell me how i am supposed to extract the data from it. i know it has a lot of operations/methods or whatever it's called and i know it has something to do with xml. im doing a website in asp.net and c#.

i've been searching for some code but i dont really understand it.

NameoftheService.Service myservice = new NameofTheService.Service();

and to call the method/operation (example):

var abc = myservice.GetWeather(parameter);

but i cant get this thing to work. i've replaced the code above with correct information but it says could not execute query. i dont really know what to do

도움이 되었습니까?

해결책

To bind grid in asp.net is as simple as binding it with object list. Consider the product service. So your code should be like...

ProductsService.DataSetWebService ws = new ProductsService.DataSetWebService();  
GridView1.DataSource = ws.GetProducts();  
GridView1.DataBind();

다른 팁

One of the properties of NameOfTheService.Service will be a DestinationURL or ServiceURL that you need to set.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top