Click here to Skip to main content
15,886,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a web service in .net which will retrieve the city name based on the given input text. The web service is working properly. I have used that web service in an AutoCompleteExtender Control in ajax control toolkit. But i am not getting the list of suggestions if i type anything in the textbox.

The web service structure is:
C#
public string GetCompletionList(string prefixText)


The HTML file is:
ASP.NET
<body>
    <form id="form1" runat="server">
<div>
.........................................
.........................................
.........................................
<asp:TextBox ID="txtsearchcity" runat="server" class="autosuggest"></asp:TextBox>
<asp:AutoCompleteExtender runat="server" 
        ID="autoComplete1" 
        TargetControlID="txtsearchcity" 
        ServicePath="http://localhost:3935/SearchCity/searchcity.asmx" 
        ServiceMethod="GetCompletionList"
        MinimumPrefixLength="2"
        CompletionInterval="1000" 
        EnableCaching="true" 
        CompletionSetCount="20">
</asp:AutoCompleteExtender>
.........................................
.........................................
.........................................
</div>
</form>
</body>


What should be the exact ServicePath and ServiceMethod???
Whether the css file is necessary to get the output???

Anybody Please help out...
Thanks in advance
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900