Sample VB .NET code is:
set
ListBox1.DataSource = dt
ListBox1.DataTextField = "COMPANY_NAME"
ListBox1.DataValueField = "CUSTID"
val=ListBox1.SelectedItem.Value
For i = 0 To ListBox1.Items.Count - 1
If ListBox1.Items(i).Selected = True Then
val= ListBox1.Items(i).Value
End If
Next