How to Access DataTable from a SqlDataSource Control

First convert source of a SQLDataSource into a DataView,
DataView dv1 =  (DataView)SqlDataSource2.Select(new DataSourceSelectArguments());

then Cast it as DataTable using ToTable() method of DataSet,
DataTable dtSpecTable1 = (DataTable)dv1.ToTable();

Now 'dtSpecTable1' contains your desired DataTable. If u know how to convert such
a dataTable into a named DataTable, please share here in comments.

No comments:


Related Posts with Thumbnails