Dropdown List Box - Adding an item value

B

Brian Candy

With a drop down list box, I have discovered how to add a text
description. Now how do I go about adding a value?

For FNa = 0 To dsDetails.Tables("Team").Rows.Count - 1
Row = dsDetails.Tables("Team").Rows(FNa)
dlTeam.Items.Add(Row.Item("Description"))
Next

Thanks in advance

Brian Candy
 
J

Jose Marcenaro

use this syntax

dlTeam.Items.Add(New ListItem("No", 0))
dlTeam.Items.Add(New ListItem("Yes", 1))

Regards
Jose
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top