Just trying to see if I can add a definition/register AJAX web service explicitly in a user control that uses it (via client side). Web service is defined and located on the same server as the control(s) that use it, but the control is unable to use it.
It works when I’m adding reference to the web service on SriptManager on the master page, but I want to specifically add it to be used by custom control, and then wan’t to remove it from the master page.
Scenario:
I’ve tried:
<%@ Register TagPrefix=”ajaxws” Assembly=”AssemblyName” Namespace=”WebService.AjaxNameSpace” %>
Let me know if some more details are needed. I’ve been researching a fix for this, but the only reliable fix I found, is to add the .asmx to ScriptManager on a master page.
It would seem you are trying to add a script reference or a service reference to your script manager.
You can accomplish this in the code-behind of your user control, using a statement such as:
… for which you need the Script Reference class, or …
… for which you need the Service Reference class.
Note that either approach will give you fits if the page doesn’t have a script manager.