Dropdownlist in this case how???

  • Thread starter Thread starter Hai Nguyen
  • Start date Start date
H

Hai Nguyen

Hi everyone

I'm developing an wep application, I got stuck into a problem.
My database has a table which has 2 fields
Table1

X Y
A Apple
B Banana
C Cat
D Dog

I would like to ask if there is a way so that I can add these two columns
into my dropdown list which will look like this

Apple
Banna
Cat
Dog

whichever values I select from the dropdownlist I wold like to get the
equivalent value; for instance
if I choose Cat, I want to get the value C for later use.

Thanks for any help
 
Set the DataTextField to the field you want to appear in the combo box
(Cat)and the DataValueField to the one you want to have to use later (C)
 
Back
Top