Forum Moderators: open
<asp:DropDownList ID="DDLocations" runat="server" style="width:80%" DataSource="<%# DSLocations.DefaultView %>" DataTextField="LOCATION" DataValueField="LOCATION">
</asp:DropDownList>
So that the final drop down looks something like:
NY
NJ
PA
CT
My question is...is there a way to add something like what you often see in drop down menus such as "Select a Location" as the first option in the drop down, but having that not have to come from the database:
Select A Location:
NY
NJ
PA
CT
I appreciate any help you can offer,
-Mike
DDLocations.datasource = DSLocations.DefaultView
DDLocations.databind
DDLocations.items.insert(0,"Select A Location:")
You may not have to do the datasource and databind in the codebehind....but I'm not sure of the order of events. Doing it all together as I have above guarantees that your inserted item does not get dropped by the databind....experiment.