title: Listbox Control Item - Multiple Names (and/or variables)?
body: <p>I have a lot of data that's coming from a database and being adding to a listbox. The data that's coming from the database is a unique ID, and a name. </p>
  
  <p>Is there any way I can make the item contain both the ID and name? I know I can append it, that's not what I'm looking to do. I need a way to be able to either get the ID, or get the name, while displaying them both.</p>
  
  <p>I have gotten as far as creating a class:</p>
  
  <pre><code>Class Item
      Property ID as Integer
      Property Name as String
  
      Sub New(ID as Integer, Name as String)
          Me.ID = ID
          Me.Name = Name
      End Sub
  
      Overrides Function ToString() as String
          Return Name
      End Function
  End Class
  </code></pre>
  
  <p>That looks like it should do the trick, but I'm having trouble getting the ID, instead of the name. To put it simply, I wish I could do this: listbox1.selecteditem(id) to get the id, or listbox1.selecteditem(name) to get the name.</p>
  
  <p>Any ideas on how to implement this?</p>