I have a listboxes that are set as SelectionMode="Multiple".
I am trying set them programmatically. I have a comma delimited string that I split into an array then set each item. The problem is that no matter how many I set, only the last one stays selected.
Why is only the last one getting set?
Thanks,
Tom
I am trying set them programmatically. I have a comma delimited string that I split into an array then set each item. The problem is that no matter how many I set, only the last one stays selected.
Code:
Dim listBoxValues As String()
'set the string as comma delimited
listBoxValues = Split(controlValue, ",")
For Each value As String In listBoxValues
DirectCast(item, ListBox).SelectedValue = value
Next
Why is only the last one getting set?
Thanks,
Tom