Dropdownlist select by datavalue

  • Thread starter Thread starter Lars Pedersen
  • Start date Start date
L

Lars Pedersen

Hi!

Have can i select an item in a DropDown List, based on a datavalue.

thanks

-Lars
 
I found a solution that works:

DropDownList.SelectedIndex =
DropDownList.Items.IndexOf(DropDownList.Items.FindByValue("Value"));
 

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

Back
Top