Selecting Exact Items from Combo box based on text in C#

The following code will help you to accomplish this.

 

cboState.SelectedIndex = cboState.Items.IndexOf(cboState.Items.FindByText("text"));

 

Note: cboState is the Id of my DropDown List.

Ebook Download
View all
Learn
View all