Hi Eric,
You think you made a loop but you did not,
You have to loop through the items from your listbox
Beneath some examples, roughly written so watch errors
I hope this helps?
Cor
something as for a winform
\\\
dim myarray(listbox1.selecteditems) as string
dim i as integer
for i = 0 to listbox1.selecteditems.count - 1
myarray(i) = listbox1.selecteditems(i).text
next
///
and for a webform
dim myarray(listbox1.items) as string
dim i as integer
for i = 0 to listbox1.items.count - 1
if listbox1.Items(i).selected then
myarray(i) = listbox1.selecteditems(i).text
end if
next
///
I hope this helps?
Cor
How can i get the itemdata form each item in a mulitselect list.
I made a loop but keep getting only the first value.
Dim i
Dim array1(100)
For i = 1 To aantalrecords
If ListBox1.GetSelected(i - 1).ToString = True Then
ListBox1.SelectedIndex = i - 1
mylist = ListBox1.SelectedItem
array1(i) = mylist.ItemData
End If
Next
can someone please help me out?
Eric