Question

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

Était-ce utile?

La solution

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();

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top