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);
}
}
VulpesPosted Oct 11, 2011, 4:27 AM
Dane MarshallPosted Oct 11, 2011, 4:33 AM
ShopCartCB.Items.Add(
new ListItem(shr.ShoppingCart_Name, shr.ShoppingCart_ID.ToString()));