- Remove the ServicePath from the extender attributes altogether.
- Specify the name of your method in the ServiceMethod attribute,
- Add your method call to the script of the page itself. It will not work with a codebehind directly. For example:
Put this code in the page markup:
<script runat="server">
[System.Web.Script.Services.ScriptMethod]
{
return "this is sample text".Split()
}
</script>
Also make sure you set the service method to the function name and omit the ServicePath :
<cc1:autocompleteextender id="AutoCompleteExtender1" runat="server" behaviorid="AutoCompleteEx" targetcontrolid="txtOrderNumber" ServiceMethod="GetCompletionList" CompletionInterval="500" EnableCaching="true" CompletionSetCount="20" DelimiterCharacters=";, :">
I just SignUp to Thank you.
ReplyDeleteShort article but very clear.
a goog add for Ajax/Atlas web site.
I tried this, but it didn't work. I get no errors, but neither a success.
ReplyDeleteWhen I type in the textbox, nothing happens...
It doesn't jump into the script method
Do I have some mor to look for what you didn't mention in your article?
In IE7 its working fine but in IE6 its going back to list controls can any one help me this
ReplyDeleteRaja
ReplyDeleteEnable the PageMethods in ScriptManager and try,
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"/>
Cheers
Thankyou very much...really helpful
ReplyDeleteGreat article it was just what I needed to know!
ReplyDelete