When creating a dynamic checkboxlist, I am able to add items to the checkbox list by doing SecCB.Items.Add(sec.Sector_Name); but how do I add an ID or Value to the item?
Thanks
public void DeveloperSectors()
{
DCDataContext dc = new DCDataContext();
SecCB.RepeatColumns = 3;
SecCB.RepeatDirection = RepeatDirection.Horizontal;
IQueryable
foreach (DeveloperSector sec in DevSecRe)
{
SecCB.Items.Add(sec.Sector_Name);
}
}

VulpesRank #55 · 29.2K reputationPosted Oct 11, 2011, 12:27 AM EDT
Dane Marshall6 reputationPosted Oct 11, 2011, 12:33 AM EDT
ShopCartCB.Items.Add(
new ListItem(shr.ShoppingCart_Name, shr.ShoppingCart_ID.ToString()));