ASP.NET 2.0 C# DataSet -> WebServices

D

David R.

I would like to consume a web service. There is one method in this
webservice that returns the results in a DataSet type.

I know that I can return the data in a GridView control. However, if I want
to deal with the data behind the scenes (without displaying to the user),
how do I do it?

For example, this method might return the City and temperature in the
DataSet, how do I retrieve this info without outputting to a GridView
control?

Thanks.
 
G

Guest

If the webservice method returns a dataset, you can do anything you want with
this dataset (store it in Session or Cache, for example).
Binding it to a GridView or some other control is a separate operation.

Or you could do both- store it in Session AND bind it to the gridview.

DataSet myDs = myWebServiceProxy.MethodThatGetsDataset();
Session["myDs"]=myDs

Does that help?
 
B

Bob

Once you get the DataSet myDs, how do you step through its tables and
fields? Do you use DataTable? If you have some code sample, that would be
helpful.

Peter Bromberg said:
If the webservice method returns a dataset, you can do anything you want with
this dataset (store it in Session or Cache, for example).
Binding it to a GridView or some other control is a separate operation.

Or you could do both- store it in Session AND bind it to the gridview.

DataSet myDs = myWebServiceProxy.MethodThatGetsDataset();
Session["myDs"]=myDs

Does that help?

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




David R. said:
I would like to consume a web service. There is one method in this
webservice that returns the results in a DataSet type.

I know that I can return the data in a GridView control. However, if I want
to deal with the data behind the scenes (without displaying to the user),
how do I do it?

For example, this method might return the City and temperature in the
DataSet, how do I retrieve this info without outputting to a GridView
control?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top