A
Andre
Hi,
I'm using the DataSource and SqlDataSource to insert value in my
dropdownlist, but i want to add a -- Please Select -- at the top of the
list, but can't find a way to make it.
<aspropDownList ID="ddTown" runat="server" DataSourceID="SqlDataSource1"
DataTextField="idTown" DataValueField="idTown"></aspropDownList>
Here's some try i've made, with no success :
ddTown.Items.Add("-- Please select --")
ddTown.Items.Add(New ListItem("-- Please select --"))
ddTown.Items.Insert(0, New ListItem("-- Please select --"))
ddTown.Items.Insert(0, "-- Please select --")
Did someone have a way to make it ?
Thank you
I'm using the DataSource and SqlDataSource to insert value in my
dropdownlist, but i want to add a -- Please Select -- at the top of the
list, but can't find a way to make it.
<aspropDownList ID="ddTown" runat="server" DataSourceID="SqlDataSource1"
DataTextField="idTown" DataValueField="idTown"></aspropDownList>
Here's some try i've made, with no success :
ddTown.Items.Add("-- Please select --")
ddTown.Items.Add(New ListItem("-- Please select --"))
ddTown.Items.Insert(0, New ListItem("-- Please select --"))
ddTown.Items.Insert(0, "-- Please select --")
Did someone have a way to make it ?
Thank you