Reputation: 164
I need to read value of the dataset. This dataset return many rows. and each rows have single value (Customer_Name)
Upvotes: 0
Views: 770
Reputation: 3455
If you have one table in dataset and that table has one column you could do it like this:
foreach (DataRow row in dataSet.Tables[0].Rows)
{
string result = row[0].ToString();
}
Or:
foreach (DataRow row in dataSet.Tables["tablename"].Rows)
{
string result = row["columnname"].ToString();
}
Upvotes: 3