Error: AjaxControlToolkit.AutoCompleteExtender missing required ServiceMethod property value for txtSearch_AutoCompleteExtender

Last Reply on Sep 12, 2016 06:33 AM By dharmendr

Posted on Sep 12, 2016 02:18 AM

 

Server Error in '/' Application.
AjaxControlToolkit.AutoCompleteExtender missing required ServiceMethod property value for txtSearch_AutoCompleteExtender.
Parameter name: ServiceMethod
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: AjaxControlToolkit.AutoCompleteExtender missing required ServiceMethod property value for txtSearch_AutoCompleteExtender.
Parameter name: ServiceMethod

Source Error:


Line 6:               source: function (request, response) {
Line 7:                   $.ajax({
Line 8:                       url: '<%=ResolveUrl("~/Timeline.aspx/GetNames") %>',
Line 9:                           data: "{ 'prefix': '" + request.term + "'}",
Line 10:                          dataType: "json",

 

You are viewing reply posted by: dharmendr on Sep 12, 2016 02:23 AM.
Posted on Sep 12, 2016 02:23 AM Modified on on Sep 15, 2016 02:33 AM

Hi micah,

Check you didn't assign WebMethod attribute to the method in code behind. Your code should be like below.

[System.Web.Services.WebMethod]
public static string[] GetNames(string prefix)
{
}

Also You need to assign the ServiceMethod to the AutoCompleteExtender.