I have been searching for a replacement for ItemData in ListBoxes. I have read all of the posts on the subject and have gotten this far:
Public Class ListBoxItem
Private m_strName As String
Private m_intID As Integer
Public Property Name() As String
Get
Return m_strName
End Get
Set(ByVal Value As String)
m_strName = Value
End Set
End Property
Public Property ID() As Integer
Get
Return m_intID
End Get
Set(ByVal Value As Integer)
m_intID = Value
End Set
End Property
Public Overrides Function ToString() As Integer
Return m_strName
End Function
End Class
To load the listbox, I have done this:
lstEntry.Name = rsIQ.GetString("FEG_SYSTEM
")
lstEntry.ID = rsIQ.GetInt16("MID")
lstSystems.Items.Add(lstEn
try)
My question is how do I retrieve the value in ID from the entry in the listbox selected by the user? Would it be different if the listbox were a checkbox style?
Thanks!
Start Free Trial