DataRow Column Iterator


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. foreach(DataRow row in dr.Table.Rows)
  2. {
  3. int colCount=0;
  4. foreach(DataColumn column in dr.Table.Columns)
  5. {
  6. Response.Write(dr.Table.Columns[colCount].ColumnName + ": " + dr[column].ToString() + "<br />");
  7. colCount ++;
  8. }
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.