drop down list value in asp.net

前端 未结 9 1927
刺人心
刺人心 2021-01-18 08:29

I want to add a value to the drop down list that cannot be selected, like a title. Ex: I have a month drop down list. The very first item should be \"select month\" this sho

9条回答
  •  广开言路
    2021-01-18 08:30

    Say you have a drop down called ddlMonths:

    ddlMonths.Items.Insert(0,new ListItem("Select a month","-1");
    

提交回复
热议问题