Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You don't need to implement a separate web-service in order to provide a textbox with auto-complete functionality, however, you <em>do</em> need to provide the autocomplete extender with a valid <em>web method</em> that it can use to call upon to retrieve the list of matching entries.</p> <p>The key properties for the AutoComplete functionality of the AutoComplete Extender control are the ServiceMethod and ServicePath properties. The ServiceMethod specifies the name of the <em>web method</em> that is called by the AJAX framework to retrieve the matching items for your autocomplete dropdown, and the ServicePath property specifies the full path and filename for the file that will contain the ServiceMethod properties' method. Note that the ServicePath property is, however, optional.</p> <p>If you omit the ServicePath property, the AJAX framework will attempt to find the ServiceMethod web method in the code within your actual web page upon which the textbox and autocomplete extender are sited. This is usually in a "code-behind" file.</p> <p>From the <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx" rel="noreferrer">AutoComplete Sample</a> page:</p> <blockquote> <ul> <li>ServiceMethod - The web service method to be called. The signature of this method must match the following:</li> </ul> <p>[System.Web.Services.WebMethod]<br> [System.Web.Script.Services.ScriptMethod]<br> public string[] GetCompletionList(string prefixText, int count)<br> { ... } </p> <p>Note that you can replace "GetCompletionList" with a name of your choice, but the return type and parameter name and type must exactly match, including case.</p> <ul> <li>ServicePath - The path to the web service that the extender will pull the word\sentence completions from. <strong>If this is not provided, the service method should be a page method.</strong></li> </ul> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload