manjula d

manjula d

  • NA
  • 172
  • 139.5k

error:cannot convert type 'Tblname' to "System.Data.DataRow'

Oct 21 2013 12:52 AM
 var objCategory = (from C in objbidportalEntity.bp_category select C).ToList();
                       
                        foreach (DataRow dr in objCategory) // Loop through List with for
                        {
                            ddlCategory.Items.Add(new ListItem(dr[1] + " - " + dr[2].ToString(), dr[0].ToString()));
                         }

i got an error  in foreach

Answers (1)