Tuesday, April 26, 2016

How do I get stuff back out of a DataSource?

We all know how to hydrate a DataSource and then DataBind as suggested here right? But how do we read into a ObjectDataSource to loop through its rows on the C# side if it is prepped in the ASP.NET markup? You may cast it's guts back to a DataTable like so:

DataTable dataTable = (DataTable) MyDataSource.Select();

No comments:

Post a Comment