2
Answers

having trouble populating a dropdown list !!!

jpknarr

jpknarr

13y
2.7k
1
i don't know how to populate a drop down list ... please help this is what i have so far... i can actually populate the drop down, but it seems as if all the text values are different and the "value" values are all the same here's the code .... Dim ConnectionString As String = "server=D******;user=*****;password=*****;database=f***23" Dim cnn As New SqlConnection(ConnectionString) Dim da As New SqlDataAdapter("select distinct popout_num from popouts", cnn) ' where "Popouts" is the table Dim ds As New DataSet Dim dt As New DataTable da.Fill(ds) 'Fill the Drop Down List with Popout Numbers DropDownList.DataSource = ds DropDownList.DataTextField = "popout_num" DropDownList.DataValueField = "popout_num" DropDownList.DataBind() PLEASE PLEASE PLEASE HELP thanks in advance. DJ
Answers (2)