I need to get the SelectedValue of each item selected in a
multi-selection listbox. I have the following code, but it
just returns me the SelectedValue of ONLY the first item
selected in the list:
Dim liGroup As ListItem
For Each liGroup In lstGroups.Items
If liGroup.Selecte d = True Then
blnSelected = True
Dim drGroupBridge As
dsACL.GroupBrid geRow = DsACL1.GroupBri dge.NewGroupBri dgeRow
drGroupBridge.U serID =
lstGroupUsers.S electedValue
drGroupBridge.G roupID =
lstGroups.Selec tedValue
DsACL1.GroupBri dge.Rows.Add
(drGroupBridge)
End If
Next
It does cycle thru the code twice (because I have two
items selected), so it's performing the loop fine.
However, the following line above "drGroupBridge. GroupID =
lstGroups.Selec tedValue", is the code I need to check for
the multiple SelectedValues from the lstGroups listbox.
It's only returning the first item selected in the list.
How can I accomplish this? What code am I missing???