DropDownList

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

When you are binding a dropdown to a datasource, you have
2 properties to set, the DataTextField and DataValueField.

If you are going to load the entries manually in code
rather then use the databind, how do you set these
properties?

I know (think) that if you are just loading the "text"
field, you just go drpdwon.items.add("MyTest"), but how
do you populate the equivalent to the "value" field.

Thanks in advance for your assistance!!!!!!!
 
MyDropDownList.Items.Add(New ListItem("Your Text Here", "Your Value Here"))

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Back
Top