I am trying to reference a js file in a class in an ASP.NET and I receive this error:
Assembly 'XXX' contains a Web resource with name 'XXX' but does not contain an embedded resource with name 'XXX'
Searching the web tell me I must have a Path referencing problem, but I can't figure what is it.
Here is the hierarchy
<Root>
<App_Code>
<Application>
<MyClass.cs NameSpace="None" />
</Application>
</App_Code>
<JS>
<MyJSFile.js NameSpace="MyControls" Name="MyJSFile">
</JS>
</Root>
So in MyClass.cs I have :
[assembly: WebResource("MyControls.JS.MyJSFile.js", "text/javascript")]
[ClientScriptResource("MyControls.JS.MyJSFile", "MyControls.JS.MyJSFile.js")]
public class MyClass : ExtenderControlBase
{}
So I guess there is something I didn't get with the referencing : (RootNampeSpace).(Path).(FileName).(Extension)
My project is a ASP.NET WEB Site so I don't have properties for Build Action to set at Embedded Resources.
Also in the folder App_Code I get an error if I put my JS file saying that the language is not the same as other file in App_Code.