Web service call from JS , How To

Posted by Community Admin on 03-Aug-2018 16:36

Web service call from JS , How To

All Replies

Posted by Community Admin on 22-Apr-2011 00:00


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

Posted by Community Admin on 25-Apr-2011 00:00

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

msdn.microsoft.com/.../bb310979.aspx

Greetings,
Ivan Dimitrov
the Telerik team


This thread is closed