title: autocomplete textbox from the database
body: <p>I need my textbox to autocomplete when the user types. The value should come from the database.
  I am using the textchange property of the textbox.</p>
  
  <pre><code>protected void autocomplete(object sender, EventArgs e)
  {
      string query = "Select area,codes from tbl_pincode";
      SqlConnection conn = new SqlConnection("Data Source=win2008-2;Initial       Catalog=h1tm11;User ID=sa;Password=#1cub3123*;Persist Security Info=True;");
      SqlCommand com = new SqlCommand(query, conn);
      conn.Open();
      SqlDataReader dr = com.ExecuteReader();
      while (dr.Read())
      {
          zipcode.Text = dr.GetValue(0).ToString();
      }
      conn.Close();
  }
  </code></pre>
  
  <p>But i m not getting the desired result.
  Any ideas how to go about it?</p>