1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Web service call from JS , How To

Web service call from JS , How To

2 posts, 0 answered
  1. Bassem
    Bassem avatar
    19 posts
    Registered:
    29 Dec 2010
    22 Apr 2011
    Link to this post

    Hi I am realy newbie in JS and JQuery 
    Here the picture : 

    I have a .ascx that has a Grid (ASP.NET) each row has 2 buttons that calls 2 web methods I am Using (2 js files)

    I had it working fine in ASP.NET 

    Now I want to integrate it in SF. 

    I've put the in SF as widget but when I try to use it in a page I get the error : "Could not find a part of the path 'MyProject\UserControls\course\App_LocalResources\'."

    In my case I am using French language. but I don't have App_LocalResources Folder in that location, SF had created another one (Global Resources) in App_Data after I added the french language.

    Here I doubt it is problem of language since for all other User Controls used in french page I did the same and I could upload them in SF without having this error so I guess this is because it uses JQuery and web method calls

    So,  What is the best practice to use JS or JQuery in Sitefinity (use master page template and refrence them in Head tags , register them in UC , or using the javascript widget of SF, or including it in the head of the page in SF UI ...)

    I have tried all those solutions but I always had the same error.  I am missing something. 
    Should I place the web service file in a specific folder , right now I have it in same folder as the UC. 

    any help would be appreciated

    Bassem
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    25 Apr 2011
    Link to this post
    Hi Bassem,

    Are you using and resource keys in your user control? It looks like it is trying to pick the values as a local resources. You can create a label using Interface Labels & Messages. Then you would be able to reference this label by using the following syntax.

    <%$ Resources:ResourceType, Key%>

    As for making service call from js, you can use Sys.Net.WebRequest

    http://msdn.microsoft.com/en-us/library/bb310979.aspx

    Greetings,
    Ivan Dimitrov
    the Telerik team

2 posts, 0 answered