Many times, your DropDownList will be populated with specific items from a database. You might ask yourself “How can I add an Item at the top? – – maybe ‘Select’ or something like that.
It’s very easy and there are only 2.5 steps.
First, in your DropDownList tag, set the ‘AppendDataBoundItems’ property to ‘True’. Next (you’re most probably doing your work in Visual Studio) go to the properties window and click on the ‘Items’ property, to add an item. Put in any text you would like here, like ‘–Select–‘ or whatever.
Technically, these 2 steps are all you really need, but you probably will want to add code so that if ‘–Select–‘ is chosen, nothing happens, since it won’t be a valid choice. (That’s why I said 2.5 steps earlier)
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF