DropDownList

  • Thread starter Thread starter zoneal
  • Start date Start date
Z

zoneal

hi guys,

i am using asp.net2.0 in VS2005.

The case i am having is that i have a dropdownlist with a list of
values like item one , item two and item three; inside the DB i am
storing the values as number not the item name like 1 for item one, 2
for item two and so on.

what i want is that when retrieving the item from the DB i want the
displaied name to be the real name which is item one and so on....

how to do that???

help appreciated.
 
Assuming the DropDownList uses ID column for values and Name for text:
DropDownList.Items.FindByValue(id).Selected = true;

hi guys,

i am using asp.net2.0 in VS2005.

The case i am having is that i have a dropdownlist with a list of
values like item one , item two and item three; inside the DB i am
storing the values as number not the item name like 1 for item one, 2
for item two and so on.

what i want is that when retrieving the item from the DB i want the
displaied name to be the real name which is item one and so on....

how to do that???

help appreciated.
 
Back
Top