title: Dynamically search database and show results using Javascript and C#
body: <p>I want to search a database for a clientName and dynamically show the results while the user is typing so they can select a User. It is now my understanding that this cannot be done without using javascript.</p>
  
  <p>So if the user is typing "Al" then reults of clients called "Allan, Alison, Ali..." etc would show in a dropdownlist like display under it.
  At the moment the user is entering the Clients name into a Textbox.</p>
  
  <p>I know that creating the DropDownList should be done something like this:</p>
  
  <pre><code>private void InitializeNameDropDown(DataTable dtTable)
  {
      string ClientName = Clienttb.Text;
      MySqlDataReader Reader = MySQLQuery(ClientName);
      int nTotalRecords = dtTable.Rows.Count;
      for (int i = 0; i &lt; nTotalRecords; i++)
      {
          NameDropDown.Items.Add(dtTable.Rows[i]["Client"].ToString());
      }
  }
  </code></pre>
  
  <p>MySQLQuery() just checks that the client exists within the database.
  But I don't know how to dynamically interact with the database to return the results as the user is typing.</p>
  
  <p>Any Help will be appreciated, Thank you in advance.</p>