My textbox is not autocompleting with the AutoComplete Extender
Markup:
<asp:TextBox ID="tbSearch" runat="server"/>
<开发者_开发问答cc1:AutoCompleteExtender ID="tbSearch_AutoCompleteExtender" runat="server"
DelimiterCharacters="" Enabled="True" ScriptPath="AutoComplete.asmx" ServiceMethod="GetCompletionList" TargetControlID="tbSearch">
</cc1:AutoCompleteExtender>
<asp:Button Text="Find" OnClick="btnFind" runat="server"/>
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
The service is working, but nothing happens when I change the text inside the text box. Here is my web service:
[WebService(Namespace = "http://localhost:1784/WebSite10/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class AutoComplete : System.Web.Services.WebService {
The web service should be referenced in the ServicePath property of the auto complete extender, not the ScriptPath property. See this example: http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/AutoComplete/AutoComplete.aspx
HTH.
精彩评论