AspNetNuby
AspNetNuby

Reputation:

Getting the data retrieved by SqlDataSource (ASP.Net)

I have a SqlDataSource retrieve tabular data from a store procedure. How can I get to the data it retrieved in order to save it to the cache?

Upvotes: 1

Views: 2697

Answers (1)

Andy White
Andy White

Reputation: 88475

In your code-behind, you can run the "Select" method on the SqlDataSource to get the data. If you are binding the SqlDataSource to a control, it will automatically call select when rendering the control, but you can also call it by hand.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.select.aspx

Upvotes: 3

Related Questions