asp:dropdownlistbox code behind to select entry

D

David A. Beck

I have an aspx page with several asp:dropdownlistboxes on it. When I load
data, I need to set the selected entry in the ddlb. I have a value, but have
not been successful in setting the text portion of the control.
(ddlbTest.SelectedItem.Text = "Booga") Do I need to iterate through the ddlb
to find the index of the value I want and then set the SelectedIndex?
 
M

MSFT

Hi David,

You may try:

ddlbTest.SelectedValue = "Booga"

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top