DropDownList Binding with Existing List Values
This is something I see asked about frequently, so I decided to post a solution on my blog. What happens if you need to bind data to a list that has static values (values defined in the Items collection, or <asp:ListItem> elements defined in the list)?
The solution is to first change the AppendDataBoundItems property to true, so that data binding doesn't clear the current list, but appends to them. You can define static properties in many ways; I like to use the ASPX page, because this way it reduces the amount of code in the code-behind page.
<asp:DropDownList id="d" runat="server" AppendDataBoundItems="true" DataSourceID="sds">
<asp:ListItem Value="X" Selected="True">Select An Item</asp:ListItem>
</asp:DropDownList>
This item will appear in position 0, because data bound items are appended after it. I specify selected equals true, just out of habit to ensure the right item is selected. You can also use the DataSource property to specify an alternative data source, and invoke DataBind(), if you would like to bind that way as well.