webservice call from javascript with master page.

Last post 05-19-2008 10:38 AM by sivi. 4 replies.

Sort Posts:

  • webservice call from javascript with master page.

    05-08-2008, 8:30 PM
    • Loading...
    • Zenuke
    • Joined on 10-18-2006, 1:28 PM
    • Posts 168

    I am having some trouble calling a webservice from javascript when I am using a master page. The service is listed under the script manager but making a call to the service from the javascript function does not work. I've done this successfully on pages that do not use a master page. The javascript that runs in called from with in the content page.

  • Re: webservice call from javascript with master page.

    05-12-2008, 12:29 PM

    Can you post the <ScriptManager> block of your code?

  • Re: webservice call from javascript with master page.

    05-15-2008, 12:27 AM
    Answer
    Hi,
    Thank you for your post! 
    Please make sure that the path is correct. 
    The ServiceReference object can reference a Web service only in the same domain. The Web service path can be relative, application relative, domain relative, or absolute. For absolute paths, you must make sure that the path is in the same domain.
    Best Regards 

     

    Sincerely,
    Jin-Yu Yin
    Microsoft Online Community Support
  • Re: webservice call from javascript with master page.

    05-16-2008, 11:30 AM
    • Loading...
    • Zenuke
    • Joined on 10-18-2006, 1:28 PM
    • Posts 168

    It is in the same domain, path was correct.

    My issue had to do with where the script manager was.

    I was using a masterpage and I originally had the script manager in the master mage but the controls that needed to access the service were in a content template. Once I moved everything to the content template content page, it worked just fine.

  • Re: webservice call from javascript with master page.

    05-19-2008, 10:38 AM
    Answer
    • Loading...
    • sivi
    • Joined on 04-17-2008, 10:38 AM
    • Posts 62

    Keep the ScriptManager in the Master Page itself and add a reference to the service. Add a  ScriptManagerProxy control to the content Page and now you can call the service from both Master page and the Content Page.

    svk

    Please remember to Mark as Answer if the solution helps to fix the problem.
Page 1 of 1 (5 items)
Microsoft Communities
Page view counter