Using aspnet 3.5. Here is my code. Yes I know I should be using jquery.
Nothing happens when I type into the textbox. I have a breakpoint in the webservice which is not getting hit.
What am I doing wrong?
<asp:TextBox ID="tbName" runat="server" ></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="tbName"
ServiceMethod="GetList" ServicePath="wsWebServices.asmx"
MinimumPrefixLength="2">
</cc1:AutoCompleteExtender>
[WebMethod]
[ScriptMethod]
public string[] GetList(string prefix, int count)
{
return new string[] { "abc", "def", "hij", "abc", "def", "hij", "abc", "def", "hij", "abc", "def", "hij" };
}
I tried calling the webservice from a javascript function and that worked. So the problem is somehow that the autocomplete is not picking up the “result” of the webservice.
All the other answers on this page either weren’t applicable or didn’t work.
I think something is missing in the ajax documentation. If I ever get this working I will write it up here.