Thursday

How to access data read by a SqlDataSource

How to access data read by a SqlDataSource
You have a datasource that returs data. And you want to access a specific field in it:
DataView dv = (DataView)MyDS.Select(DataSourceSelectArguments.Empty);DataRowView drv = dv[0];// or dr and loop throu the dvs... dv[0] assuming you only have one row.
then Variable = drv["myfield].ToString();
Good luck

No comments: