ASP.NET - how to add autocompleteextender in asp.net?

Asked By sanket patil on 16-Feb-13 06:42 AM
Hi friends i have used autocompletextender in my C# asp.net form . but it's not working fine. i have used following code.


  <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

   <asp:ScriptManager ID="script" runat="server" EnablePageMethods="true">
 </asp:ScriptManager>

   <asp:TextBox ID="txtServiceCityLocal" runat="server" Style="width: 292px; margin-left: 150px;
                                                    border: solid 1px #747474">
                                    </asp:TextBox>

   <asp:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server"
               TargetControlID="txtServiceCityLocal" ServiceMethod="GetCountries"
                ServicePath="~/WebService.asmx" MinimumPrefixLength="2"
                CompletionInterval="100" EnableCaching="false" CompletionSetCount="10">
  </asp:AutoCompleteExtender> 

 [WebMethod]
    public List<string> GetCountries(string prefixText,int count)
    {      
        List<string> CountryNames = new List<string>();
        return CountryNames;
    }


After implementation of this code i put debugger on GetCountries method. it's not calling this methode.





Danasegarane Arunachalam replied to sanket patil on 16-Feb-13 09:29 PM
Does the  method  "GetCountries" is on the same page or different page?