|
|
Rank: Guest Groups: Guest
Joined: 11/18/2007 Posts: -328
|
I'm relatively new to web services, but I've gotten similar controls to work. Here's what I'm seeing...
My markup: <asp:TextBox ID="txtProjectSearch" runat="server"></asp:TextBox> <asp:HiddenField ID="hfPortalId" runat="server" />
<autosuggest:AdvancedAutoSuggestExtender ID="AdvancedAutoSuggestExtender1" runat="server" TargetControlID="txtProjectSearch" AdditionalFields="hfPortalId" ServiceUrl="~/desktopmodules/vqa/PortalWs.asmx/ProjectsSuggest" /> <br /> <textarea id='debugConsole' cols='100' rows='30' ></textarea>
My Web Service Method: [WebMethod] [ScriptMethod] public string ProjectsSuggest(string tryValue, string[] additionalParams) { List<SuggestionItem> suggestions = new List<SuggestionItem>(); SuggestionItem item1 = new SuggestionItem(); item1.Title = "test item"; item1.Description = "this is the description"; item1.Id = "12"; SuggestionItem item2 = new SuggestionItem(); item2.Title = "test item number 2"; item2.Description = "blah de do"; item2.Id = "324";
suggestions.Add(item1); suggestions.Add(item2);
return SuggestionItem.SuggestionArrayToJSON(suggestions.ToArray(), tryValue); }
I've tried testing my web service method without ajax and it works fine. I've tried changing the serviceurl with no luck. Where might the disconnect be? or how might I debug this issue?
Thanks, Ben
|
|
Rank: Guest Groups: Guest
Joined: 11/18/2007 Posts: -328
|
oh and I forgot. My debug console error show this message which seems to indicate that it's at least sending the request.
Error: Starting SuggestEngine inputFieldId:dnn_ctr487_ProjectTest_ProjectSearch1_txtProjectSearch serviceUrl:http://172.17.104.50/desktopmodules/vqa/PortalWs.asmx/ProjectsSuggest additionalFields:hfPortalId=dnn_ctr487_ProjectTest_ProjectSearch1_hfPortalId updateFieldId:undefined ShowSuggestions Call textbox:[object HTMLInputElement] textbox.value: ShowSuggestions Call textbox:[object HTMLInputElement] textbox.value:a doing service request:tryValue=a&additionalParams=hfPortalId|4 ShowSuggestions Call textbox:[object HTMLInputElement] textbox.value:asf doing service request:tryValue=asf&additionalParams=hfPortalId|4
|
|
Rank: Administration Groups: Administration
Joined: 11/18/2007 Posts: 25
|
Hi Ben, Do you describe you Web Service Class with this attributes: Code: [WebService(Namespace = "http://convincingmail.com/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Suggestions : WebService { ///...methods... }
Thanks
|
|
Rank: Guest Groups: Guest
Joined: 11/18/2007 Posts: -328
|
My attributes are listed the same. No luck.
I've even tested using the web service with the default ajax control toolkit auto complete control with success.
|
|
Rank: Administration Groups: Administration
Joined: 11/18/2007 Posts: 25
|
Ben, Can you post full source code here or send to me via support email listed on the site?
Thanks
|
|
|
Guest |