jpknarr

jpknarr

  • NA
  • 8
  • 0

having trouble populating a dropdown list !!!

Apr 14 2004 3:52 PM
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)