Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > CheckBoxList -- Iterating Through Items

Thread Tools

CheckBoxList -- Iterating Through Items

Posts: n/a
Can someone tell me how I can iterate through all of the Checkboxes included
within a checkbox list?

The code I currently have is as follows (it doesnt work for some reason, it
returns that no items are selected):

foreach(ListItem objItem in chkCategory.Items)
if(objItem.Selected == true)
category += objItem.Text;



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iterating a std::vector vs iterating a std::map? carl C++ 5 11-25-2009 09:55 AM
Checkboxlist inside Repeater - doesn't fire click event for Checkboxlist JD ASP .Net 5 08-08-2007 11:28 AM
Looping through CheckBoxList items doesn't pick up selected ones when items were disabled Bart Van Hemelen ASP .Net 2 09-04-2006 08:35 AM
Iterating through all the menu/child items in a menu control Bryan ASP .Net 1 03-01-2006 09:38 AM
Iterating through Repeater.Items Mark Fox ASP .Net 1 11-14-2003 12:40 AM