bertino12
asked on
Listbox hidden field
Is there a hidden field in listbox controls?
Im doing an asp application that has a listbox that has data in it. I need to associate a unique ID with the data, but I dont want to show it.
so the listbox data would actually be like:
234 item1
394 item2
907 item3
but the listbox would just show
item1
item2
item3
How could I set this up?
later i will need to access this data by index.
Im doing an asp application that has a listbox that has data in it. I need to associate a unique ID with the data, but I dont want to show it.
so the listbox data would actually be like:
234 item1
394 item2
907 item3
but the listbox would just show
item1
item2
item3
How could I set this up?
later i will need to access this data by index.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This solved my problem. Ill give you credit because you mentioned the text and value properties and it got me looking for a value property.
Dim ds As DataSet
ds = Me._Helper.popKeywords(int DecisionId )
For i As Integer = 0 To ds.Tables(0).Rows.Count - 1
Me.lbKeywords.Items.Add(ds .Tables(0) .Rows(i).I tem("term" ))
Me.lbKeywords.Items.Item(i ).Value = ds.Tables(0).Rows(i).Item( "term_id")
Next
ds = Nothing
Dim ds As DataSet
ds = Me._Helper.popKeywords(int
For i As Integer = 0 To ds.Tables(0).Rows.Count - 1
Me.lbKeywords.Items.Add(ds
Me.lbKeywords.Items.Item(i
Next
ds = Nothing
ASKER
Dim ds As DataSet
ds = Me._Helper.popKeywords(int
For i As Integer = 0 To ds.Tables(0).Rows.Count - 1
Me.lbKeywords.Items.Add(ds
Next
ds = Nothing
currently, this is how I add my items, but my terms need to have a "term_id" associated with them in that control, but the "term_id" cant be seen in the listbox.
ds.Tables(0).Rows(i).Item(