AutoCompleteExtender is not visible

Jul 28 2011 5:00 AM
 AutoCompleteExtender is not visible. I m not geting any error also.
Here is my code
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    <Services>
                        <asp:ServiceReference Path="~/AutoComplete.asmx" />
                    </Services>
                </cc1:ToolkitScriptManager>

 <asp:TextBox ID="txtPartyName" runat="server" Width="150px"></asp:TextBox>
                <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtPartyName"
                    EnableCaching="true" ServicePath="AutoComplete.asmx" ServiceMethod="GetPartyName"
                    MinimumPrefixLength="2" UseContextKey="false">
                </cc1:AutoCompleteExtender>

AutoComplete.asmx
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;
using System.Web.Script.Services;
using System.Data;
using Businesslogic;


[System.Web.Script.Services.ScriptService]


[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

public class AutoComplete : System.Web.Services.WebService
{

    [WebMethod]
    public string[] GetPartyName(string prefixText)
    {

         Businesslogic.BLInquiry objInq;
        objInq = new BLInquiry();
        //MySQLConnection con = new MySQLConnection();
        // string qry = "SELECT column_name FROM table_name WHERE column_name LIKE '%" + prefixText + "%' ";
        DataSet ds = new DataSet();
        ds = objInq.GetPartyName(prefixText);

        string[] items = new string[ds.Tables[0].Rows.Count];
        int i = 0;
        try
        {
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                items.SetValue(dr["PartyName"].ToString(), i);
                i++;
            }
        }
        catch (Exception err)
        {
            throw err;
        }
        return items; //i m getting all the item in array
    
    }

}

Please tell me what's wrong with my code.

Answers (5)