i have bounded a listbox to a dataset on load. now i want to get the selected items when a button on the form is clicked,
cannot use
[CODE=VB]
Dim item As ListItem
For each item in ListBox.Items
If item.selected Then
Console.Write(i tem.Text.ToStri ng)
End If
Next
[/CODE]
because ListItem is not defined
Please help me to fix this.just want to get the selected items. any other methods are also fine.
Thanks.
cannot use
[CODE=VB]
Dim item As ListItem
For each item in ListBox.Items
If item.selected Then
Console.Write(i tem.Text.ToStri ng)
End If
Next
[/CODE]
because ListItem is not defined
Please help me to fix this.just want to get the selected items. any other methods are also fine.
Thanks.
Comment