Hi, I figure this has been asked somewhere before but, I can't retrieve the help I'm looking for.
Basically, I'm trying to parse the strings of all selected items in a ListBox called fileList.
I've tried this with a for loop as well as a foreach loop.
- foreach (ListItem li in fileList.Items)
- for(int i = 0; i < fileList.Items.Count; i++)
In both cases, I've ensured to use:
- fileList.SelectedItem.Selected
when looking for the string of the current index.
The rest of the method selects different methods from other classes and goes into more detail than we need here, so have omitted this.
Unfortunately, when I select multiple items, I get the first selected item posted each time, regardless of how many more items are selected.
What am I doing wrong?