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.
I have seen many times developers get confused when they want to select a particular item in the dropdown list, based on the text using 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.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · C#Modern CSharp Mastery - Advanced Guide for Experienced DevelopersDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.