I have a listbox on my aspx page.
I’d like it to display both the text and associated values (not the index). So if I were to add items like this
Dim this As ListItem = New ListItem("Horse", "2")
Dim that As ListItem = New ListItem("Dog", "3")
me.ListBox.Items.Add(this)
me.ListBox.Items.Add(that)
my listbox would look something like this (please excuse my list of artistic talent):
--------------
|2 Horse |
|3 Dog |
--------------
Is there any way to do this?
Thanks,
Jason
Sure, why not just combine the text and the value into a variable.