0

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.

3
Contributors
2
Replies
8
Views
4 Years
Discussion Span
Last Post by cyberdaemon
0

are you sure this info is correct? correct path?

ServiceMethod="GetCountries" ServicePath="~/WebService.asmx"

0

where did the data coming from..? i mean what are the data that will autocomplete?is it in the dbase?array?or what?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.