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.
In both cases, I've ensured to use:
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?
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.
Code:
foreach (ListItem li in fileList.Items)
Code:
for(int i = 0; i < fileList.Items.Count; i++)
Code:
fileList.SelectedItem.Selected
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?
Comment