is it just me?

Results 1 to 2 of 2

Thread: is it just me?

  1. #1
    Join Date
    Dec 1969

    Default is it just me?

    Ok, I&#039;ve got a list of states that i&#039;m using in a form. I&#039;ve binded the dropdownlistbox to my db as such:<BR> Private Sub LoadStates()<BR> Dim DS As DataSet<BR> Dim Cmd As SqlDataAdapter<BR> Dim sPro As String<BR> Dim oCnn As SqlConnection<BR><BR> oCnn = New SqlConnection()<BR> oCnn.ConnectionString = Application("app_DBConnectionString")<BR> Cmd = New SqlDataAdapter("GET_STATES", oCnn)<BR><BR> DS = New DataSet()<BR> Cmd.Fill(DS, "STATE_NAME")<BR><BR> ddlist.DataSource = DS.Tables("STATE_NAME").DefaultView<BR> ddlist.DataValueField = "STATE_ID"<BR> ddlist.DataTextField = "STATE_NAME"<BR><BR> ddlist.DataBind()<BR> End Sub<BR><BR>So, it loads ok and all of my states show up but when i&#039;m ready to get my state data <BR>ddlist.selecteditem.value <BR>I keep getting the first value. I&#039;m beginning to think that i have something setup incorrectly or something as I have the same problem with my checkboxlist giving me incorrect data. Any suggestions would be greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: is it just me?

    Show us the dropDownList control

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts