It looks like a javascript error caused by missing some namespace. I would recommend to try to set InlineScript="true" for the ServiceReference and than to skim through the generated html (if everything is all right there should be generated javascript proxy objects for the web service).
I added a scriptmanager to my page and kept the scriptmanagerproxy in the usercontrol
Now it complained that the /App_Code/GetUserDetails.vb was missing.
I added the file and now it complains that is not written in C#
The files '/App_Code/XSLTsearch.cs' and '/App_Code/GetUserDetails.vb' use a different language, which is not allowed since they need to be compiled together.
Could you explain me where did you add the scriptmanager and how it was formed?
I think that the scriptmanger must be alocated on "parent" page that contain the usercontrol, and the scriptManagerProxy must be alocated into the usercontrol, but i tryed that and it doesn't work.
Hi, Acasado. A ScriptManager can be actually placed anywhere, but there's a strict rule that there can be only one ScriptManager for the whole page (including any masterpages and child controls). A ScriptManagerProxy is for somehow to ease this restriction (for example if you already have a ScriptManager on the page but you need some specific script or web service references in a control that's going to be used on the same page). Personally I follow the pattern that if my project uses MS Ajax then I simply place a ScriptManager on the top-level master page so that not to burden myself with placing it on any page or a user control where it's required and resolving potential conflicts with having it twice on the same page accidently.
How to add a Service Reference to Scriptmanager
Hi everyone,
I have a UserControl i have developed and it calls a webservice (ASMX) which returns some data.
It works fine when I'm trying it in my WEB project. The Masterpage on my webpage has a ServiceReference to the webservice.
I have copied the usercontrol to umbraco and it works except of it can't find the webservice method. I don't know how to add it and where?
Tried to add a new scriptmanager to the masterpage of the template but doesn't work.
PLEASE HELP!
Hi, Kristian. I believe it's exactly what you're looking for:
http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanagerproxy.aspx
H is still not working :(/
The webservice file is located in the route of the webpage c:\inetpub\wwwroot\GetUserDetails.asmx
I have no clue how to fix this now.
Do I need to add a scriptmanager somewhere?
It looks like a javascript error caused by missing some namespace. I would recommend to try to set InlineScript="true" for the ServiceReference and than to skim through the generated html (if everything is all right there should be generated javascript proxy objects for the web service).
Ok,
I will try that.. It works fine on my local project and there is no Namespace..
Thanks for trying to help me!
I had this problem with the javascript when i remove the script reference from the scriptmanager.
But it won't work in umbraco so I think there is some problemn with the scriptmanager.
Do I need to add an scriptmanager somewhere or are it already added to some default masterpage?
I think I got a bit further..
I added a scriptmanager to my page and kept the scriptmanagerproxy in the usercontrol
Now it complained that the /App_Code/GetUserDetails.vb was missing.
I added the file and now it complains that is not written in C#
The files '/App_Code/XSLTsearch.cs' and '/App_Code/GetUserDetails.vb' use a different language, which is not allowed since they need to be compiled together.
I manage to fix it now.
Added
<codeSubDirectories>
<add directoryName="CSCode"></add>
<add directoryName="VBCode"></add>
</codeSubDirectories>
in web.config under compilation.
Now it worked fine!
THx again!
Hi Kristian.
Could you explain me where did you add the scriptmanager and how it was formed?
I think that the scriptmanger must be alocated on "parent" page that contain the usercontrol, and the scriptManagerProxy must be alocated into the usercontrol, but i tryed that and it doesn't work.
Thanks
Hi, Acasado. A ScriptManager can be actually placed anywhere, but there's a strict rule that there can be only one ScriptManager for the whole page (including any masterpages and child controls). A ScriptManagerProxy is for somehow to ease this restriction (for example if you already have a ScriptManager on the page but you need some specific script or web service references in a control that's going to be used on the same page). Personally I follow the pattern that if my project uses MS Ajax then I simply place a ScriptManager on the top-level master page so that not to burden myself with placing it on any page or a user control where it's required and resolving potential conflicts with having it twice on the same page accidently.
is working on a reply...