Ajax控件工具包中的AutoCompleteExtender控件

Ajax控件工具包中的AutoCompleteExtender控件

问题描述:

我已经在.net中创建了一个Web服务,它将根据给定的输入文本检索城市名称. Web服务运行正常.我已经在ajax控件工具包的AutoCompleteExtender控件中使用了该Web服务.但是,如果我在文本框中输入任何内容,我将无法获得建议列表.

Web服务结构为:

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:

public string GetCompletionList(string prefixText)



HTML文件为:



The HTML file is:

<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>



确切的ServicePath和ServiceMethod应该是什么?
css文件是否是获取输出所必需的??

有人请帮忙...
在此先感谢



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

检查以下链接(和接受的答案)以获取解决方案.
1. AutoCompleteExtender没有调用网络服务吗? [ AJAX AutocompleteExtender无法正常工作. Web服务有效 [ ^ ]

示例
1. Ajax自动完成文本框控件 [将AutoCompleteExtender与Web服务方法一起使用 [
Check the below links ( and the accepted answers) for solutions.
1. AutoCompleteExtender not calling webservice?[^]
2. AJAX AutocompleteExtender isn''t working. Web Service works[^]

Examples
1. Ajax auto complete textbox Control[^]
2. Using the AutoCompleteExtender with a Web Service Method[^]