You can select the dropdown value by based of text. Contains works ' like ' in SQL
DropDownList1.Items.Cast<ListItem>() .Where(x => x.Value.Contains("three")) .LastOrDefault().Selected = true;
No comments:
Post a Comment