With the help of string.join, we can split a comma-separated list of values.
string.join(",", array)
Can I do the same for a CheckboxList data source?
I have a DataValueField for this and need a comma-separated values without doing iteration.
Yes, in Fx4 there is an overload of
String.Join()that takes anIEnumerable<string>.But it depends on what the DataSource property actually points to, roughly:
You may need a different lambda, and some typecasting of DataSource.
Edit: