How to Search Through a C# DropDownList Programmatically

后端 未结 9 1194
一生所求
一生所求 2021-02-14 05:24

I am having a hard time figuring out how to code a series of \"if\" statements that search through different dropdownlists for a specific value entered in a textbox. I was able

9条回答
  •  广开言路
    2021-02-14 05:52

    You can simply do like this.

    if (ddl.Items.FindByValue("value") != null) {
       ddl.SelectedValue = "value";
    };
    

提交回复
热议问题