CheckBoxList value (whole string)

Results 1 to 2 of 2

Thread: CheckBoxList value (whole string)

  1. #1
    Join Date
    Dec 1969

    Default CheckBoxList value (whole string)

    I have a simple CheckBoxList that returns about six checkboxes. Currently I am using the following to retrieve the "group"&#039;s value:<BR><BR> string checkedInds = "";<BR> foreach (ListItem currInd in inds.Items)<BR> {<BR> if (currInd.Selected) <BR> checkedInds+=currInd.Value+&#039;,&#039;;<BR> }<BR><BR>Which will return something like "4,5,6," Is there an easier way to do this?<BR><BR>In classic ASP you could read the forms collection but maybe there&#039;s something in line with the CheckBoxList control that does the same thing?<BR><BR><BR>thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: CheckBoxList value (whole string)

    according to the docs, you have to iterate the collection, like you are doing. Bummer!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts