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

Was it helpful?

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top