Maybe I’m losing my mind – I thought this was straight forward.
ListCode.DataTextField = "code_desc";
ListCode.DataValueField = "code_id";
ListCode.DataSource = Foo.GetCodes();
ListCode.DataBind();
The selection mode is set to multipls and all is good, about 50 items with appropriate values displays. Then I select 5 items and submit the form. I do a
int[] indices = ListCode.GetSelectedIndices();
and the array only has the first four items that I selected. It seems that if I select multiple items in the list and submit the form, I’m only able to retrieve all but the last selected item – it doesn’t matter if I use GetSelectedIndices or if I iterate through each item in the list.
Any help would be greatly appreciated.
Not really an answer, but I swapped in a checkboxlist and it worked like a champ.