I'm having trouble getting the Ajax Toolkit autocomplete extender to work. I have the web service set up as its own file in the same project and calling that alone works - the correct list of results is output as xml.
But when entering text into the textbox nothing happens. I don't know if the web service isn't been called or whether the response isn't being displayed.

Any help would be appreciated. Here's my code:

The web page:

<form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" >
            <asp:ServiceReference Path="AutoComplete.asmx" />
        <asp:TextBox ID="tbProduct" runat="server" autocomplete="off" />
        <ajaxToolkit:AutoCompleteExtender ID="autoComplete1" runat="server" TargetControlID="tbProduct" ServicePath="AutoComplete.asmx" ServiceMethod="getProducts" EnableCaching="true" />

The ASMX (which works fine on its own)

using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data;
using MySql.Data.MySqlClient;
using System.Configuration;

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]


public class AutoComplete : System.Web.Services.WebService


    public string[] getProducts(string prefixText)

        DataSet dtst = new DataSet();
        string connStr = ConfigurationManager.ConnectionStrings["mySQLserver"].ConnectionString;
        MySqlConnection sqlCon = new MySqlConnection(connStr);

        string strSql = "SELECT name FROM products WHERE name LIKE '" + prefixText + "%' ";
        MySqlCommand sqlComd = new MySqlCommand(strSql, sqlCon);

        MySqlDataAdapter sqlAdpt = new MySqlDataAdapter();
        sqlAdpt.SelectCommand = sqlComd;

        string[] cntName = new string[dtst.Tables[0].Rows.Count];
        int i = 0;

            foreach (DataRow rdr in dtst.Tables[0].Rows)
                cntName.SetValue(rdr["name"].ToString(), i);
        catch { }


        return cntName;



Some examples I've looked at include autocomplete="off" in the textbox control but it seems to make no difference if its there or not.

Can anyone help?


Update: I discovered the ajaxToolkit script manager and tried that but nothing changed...

I take that back - it now works with the ajaxToolkit:ToolkitScriptManager in place of the standard ScriptManager. Problem solved