C
cesark
How can I show a value at the beginning of the dropdownlist with my
structure? This initial value isn' t in the database, for instance
'(Select)'.
<script language="VB" runat="server">
Sub Page_Load()
Dim strConnection As New
SqlConnection("Server=nou;database=market1;uid=sa;password=;")
Dim families As string = "SELECT family_Name FROM
Families;"
Dim DS1 As DataSet
Dim CommandFamilies As SqlDataAdapter
CommandFamilies = New SqlDataAdapter(families, strConnection)
DS1 = new DataSet()
CommandFamilies.Fill(DS1, "Families")
MySelect1.DataSource=
DS1.Tables("Families").DefaultView
MySelect1.DataBind()
End Sub
</script>
....
<form runat="server">
<asp:dropdownlist id="MySelect1"
DataTextField="family_Name" runat="server"
class="letter1">
</asp:dropdownlist>
....
structure? This initial value isn' t in the database, for instance
'(Select)'.
<script language="VB" runat="server">
Sub Page_Load()
Dim strConnection As New
SqlConnection("Server=nou;database=market1;uid=sa;password=;")
Dim families As string = "SELECT family_Name FROM
Families;"
Dim DS1 As DataSet
Dim CommandFamilies As SqlDataAdapter
CommandFamilies = New SqlDataAdapter(families, strConnection)
DS1 = new DataSet()
CommandFamilies.Fill(DS1, "Families")
MySelect1.DataSource=
DS1.Tables("Families").DefaultView
MySelect1.DataBind()
End Sub
</script>
....
<form runat="server">
<asp:dropdownlist id="MySelect1"
DataTextField="family_Name" runat="server"
class="letter1">
</asp:dropdownlist>
....