I am trying to set the AutoCompleteExtender and cannot. I've ben through countless articles and forums, but cannot find my problem.
This is my WebService.asmx;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Net.Mail;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
[WebService(Namespace = "http://tempuri.org/")]
[System.Web.Script.Services.ScriptService]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService : System.Web.Services.WebService {
public WebService () {}
[WebMethod]
[System.Web.Script.Services.ScriptMethod(UseHttpGet = true)]
public string[] GetItemList1(string likeString)
{
string[] itemList = new string[3];
itemList[0] = "one 123";
itemList[1] = "one 124";
itemList[2] = "one 125";
return itemList;
}This is my Ajax.aspx page code:
<asp:ScriptManager ID="ScriptManager1" runat="server"><Services><asp:ServiceReference Path="~/WebService.asmx" /></Services></asp:ScriptManager>
....
<asp:Label ID="lblAutoComplete" runat="server" Text="Type for suggestions: "></asp:Label><asp:TextBox ID="txtAutoComplete" runat="server"></asp:TextBox><asp:AutoCompleteExtender ID="acePnlContent4" runat="server" TargetControlID="txtAutoComplete"
ServicePath="~/WebService.asmx" ServiceMethod="GetItemList1" MinimumPrefixLength="1" CompletionInterval="500"></asp:AutoCompleteExtender>I really do not know hat else I can try. Anyone has a remote idea?
I am using .NET 4.0 in VS 2010 if it helps (C#)