<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="~/EmployeeService.asmx" /> </Services> </asp:ScriptManager> <div> <asp:TextBox ID="txtNames" runat="server"></asp:TextBox> <div id="listPlacement" style="height: 150px; overflow-y: scroll; width: 500px;"> </div> <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" ServicePath="EmployeeService.asmx" ServiceMethod="GetEmployeeNames" TargetControlID="txtNames" runat="server" MinimumPrefixLength="1" CompletionInterval="10" EnableCaching="true" CompletionListElementID="listPlacement" CompletionSetCount="12"> </cc1:AutoCompleteExtender> </div> </form>
and service is
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]public class EmployeeService : System.Web.Services.WebService
{ public EmployeeService() { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] [ScriptMethod] public string[] GetEmployeeNames(string prefixString, int count) { List<string> lstNames = new List<string>(); lstNames.Add("srikanth"); lstNames.Add("sreeee"); lstNames.Add("aaa"); lstNames.Add("abcd"); return lstNames.ToArray(); }
}
What is the problem ?
Not understanding why auto complete functionality is not working ?
Am I missed any thing and I try to debug the following but my method is not calling while debugging ...Any help pleae..?