differring option and value in ddlb

M

Mark

I populate a drop down list box from a database, and then
insert a block value at the top (to represent "all
values"), using a ddlb.Items.Insert(0,"");
This sets both the value and the text to "". How can I
set them to different values? I need something
(conceptually, I know this overrload doesnt exist) along
the lines of ddlb.Items.Insert(0,"",All).
Thanks, Mark
 
H

HD

Mark,
After adding the item try this
ddList.items[0].text = "abc";
ddList.items[0].value = "xyz";

regards,

HD
 

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,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top