I have an ASP.NET dropdown that I\'ve filled via databinding. I have the text that matches the display text for the listitem I want to be selected. I obviously can\'t use Se
You can try:
ddItems.Items.FindByText("Hello, World!").Selected = true;
Or:
ddItems.SelectedValue = ddItems.Items.FindByText("Hello, World!").Value;
Note that, if you are not certain that an items exists matching your display text, you may need to check the results of FindByText() for null.
Note that I use the first approach on a multiple-select list, such as a CheckBoxList to add an additional selection. I use the second approach to override all selections.