title: how to set particular data from datatable in dropdownlist using vb.net
body: <p>My code is as below, here No error but <code>ddlcountry</code> and <code>ddlcity</code> are showing blank even database have value in country and city for particular row?</p>
  
  <pre><code>    Dim query As String = "select * from RES_HOTEL where Hotid=" + Request.QueryString("ID") + " "
      Dim cmd As New SqlCommand
  
      cmd.Connection = oConnection
  
      cmd = New SqlCommand(query, oConnection)
      Dim oDataAdapter As New SqlDataAdapter(cmd)
      Dim dt As New DataTable
      oConnection.Open()
      oDataAdapter.Fill(dt)
  
  
      If dt.Rows.Count &gt; 0 Then
          txtHotel.Text = dt.Rows(0)("HOTNAME").ToString()
          ddlcategory.SelectedValue = dt.Rows(0)("CATEG").ToString()
          txtaddress.Text = dt.Rows(0)("ADDRESS").ToString()
          ddlcountry.SelectedValue = dt.Rows(0)("COUNTRY").ToString()
          ddlcity.SelectedValue = dt.Rows(0)("CITY").ToString()
  
      End If
  </code></pre>