DropDownList

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.
 
S

Siva M

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.
 

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,770
Messages
2,569,586
Members
45,085
Latest member
cryptooseoagencies

Latest Threads

Top