title: Selecting Value from Combobox and display the corresponding value in a Textbox
body: <p>I have a program where in I have to select a value in a combo box and automatically display its corresponding value to a textbox.</p>
  
  <p>The program goes like this:
  I will select a product ID in combobox = 'skucbo' and then the Product Description will be displayed automatically in a textbox = 'descriptiontxt'.</p>
  
  <p>This is my code:</p>
  
  <pre><code>Private Sub descriptiontxt_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles descriptiontxt.TextChanged
  
      Dim sku As String = skucbo.SelectedValue.ToString
      Dim dr As SqlDataReader
      connect()
      cmd = New SqlCommand
      cmd.CommandType = CommandType.Text
      cmd.Connection = con
      con.Open()
      cmd.CommandText = "SELECT description FROM tbl_sku WHERE skucbo = @sku"
      dr = cmd.ExecuteReader
      con.Close()
  End Sub
  </code></pre>
  
  <p>Hoping for your response. Thanks! </p>