title: How can I get my Autocomplete extender to work?
body: <p>I've tried to the letter to search for mistakes in my code, but i can't myself get that autocomplete extender to work. Help wanted. </p>
  
  <p>Here's my code: (excerpt from my aspx page) </p>
  
  <pre><code>  &lt;asp:TextBox ID="TextBox1" Width="120px" runat="server"&gt;&lt;/asp:TextBox&gt;
      &lt;cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TextBox1" ServiceMethod="GetCompletionList" ServicePath="SearchAutoComplete.asmx" MinimumPrefixLength="1"&gt;
      &lt;/cc1:AutoCompleteExtender&gt; 
  </code></pre>
  
  <p>My Webservice code: </p>
  
  <pre><code> [WebMethod]
      public static string[] GetCompletionList(string prefixText, int count)
      {
          List&lt;string&gt; returnData = new List&lt;string&gt;();
          MySqlConnection con = new MySqlConnection(Connection.ConnectionString());
          string sql = "select title from blog where title like '%" + prefixText + "%'";
          MySqlCommand cmd = new MySqlCommand(sql, con);
          con.Open();
          MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
          while (reader.Read())
          {
              returnData.Add(reader["title"].ToString());
          }
          return returnData.ToArray();
      }
  </code></pre>