title: VB.NET get related data while entering input in textbox
body: <p>I have two textboxes, one is for the ProductName and the 2nd is for ProductPrice.</p>
  
  <p>I am not able to get the <code>txtProductPrice</code> value from the database while entering the <code>txtProductname</code>. Please help me </p>
  
  <p>Here is the code I am trying to execute... </p>
  
  <pre><code>Try
      conn.Open()
      cmd.Connection = conn
      cmd.CommandText = "SELECT price FROM products WHERE name = '" &amp; txtPN.Text &amp; "'"
      dr = cmd.ExecuteReader
  
      If dr.Read Then
  
          'what will i do here???
  
      End If
      conn.Close()
  Catch ex As Exception
      MsgBox(ex.Message)
  End Try
  </code></pre>