/*Step 1 : First convert source of a SQLDataSource into a DataView */
DataView dv = (DataView)SqlDataSourceStudentsOnly.Select(DataSourceSelectArguments.Empty);
/*Step 2: Cast it to DataTable using ToTable() method of DataSet */
DataTable dt = (DataTable)dv.ToTable();
No comments:
Post a Comment