Tuesday, April 16, 2013

// // Leave a Comment

Looping through DataSet in C#

To loop through DataTable, try this
if (datatable1 !=null)
{
foreach (DataRow dr i datatable1.Rows)
{
string text1 = dr["Column1Name"].ToString();
string text2 = dr["Column1Name"].ToString();

// and so on
//You can also set your Literal cotrol as

}
}

0 comments:

Post a Comment