VB.Net Code…
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'VB.net Code....
For i = 0 To ListBox1.SelectedItems.Count - 1
MsgBox(ListBox1.SelectedItems(i).ToString)
Next
End Sub
ASP.Net Code…
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
Button1.Click
Dim li As ListItem
For Each li In
ListBox1.Items
If
li.Selected Then
Response.Write(li.Text)
End
If
Next
End Sub