I'm having trouble getting autocompleteextender (from ajaxcontroltoolkit) to fire when it is on a user control (it works fine when everything is on an aspx page. In my case I'm using a master page as well as a user control.
Here's what I have.
On the masterpage (path: masterpages/MasterPage.master)
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePageMethods="true">
</asp:ToolkitScriptManager>
On the user control (path: controls/sitenavigation/usercontrol.ascx)
<asp:TextBox id="txtSearchInput" Runat="server" CssClass="searchinput" Columns="95" MaxLength="95"></asp:TextBox>
<asp:AutoCompleteExtender ID="txtSearchInput_AutoCompleteExtender"
runat="server" DelimiterCharacters="" Enabled="True"
ServiceMethod="GetSuggestions" ServicePath="~/App_Code/WebService.asmx"
TargetControlID="txtSearchInput" UseContextKey="False" MinimumPrefixLength="2">
</asp:AutoCompleteExtender>
On the Webservice (path: App_Code/WebService.cs)
[System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{
....
[WebMethod]
public string[] GetSuggestions(string prefixText, int count, string contextKey)
{
//my code to return string[]
}
It seems that my problem is with my ServicePath in the extender but I just can't seem to figure out what it should be, any help would be great.
Thanks.