Posted By

jonjoneshomegmailcom on 10/22/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


comma separated list


 / Published in: C#
 

  1. public string Collection
  2. {
  3. get
  4. {
  5. List<String> sb = new List<String>();
  6.  
  7. foreach (ListItem cBox in Collections.Items)
  8. {
  9. if (cBox.Selected)
  10. {
  11. sb.Add(cBox.Value);
  12. }
  13. }
  14.  
  15. return string.Join(",", sb.ToArray());
  16. }
  17. }

Report this snippet  

You need to login to post a comment.