C# ASP.NET AssemblyInfo.cs - embedded .JS resides inside a folder - how do I specify the web resource path?

Tom Knowlton
Tom Knowlton used Ask the Experts™
on
[assembly: WebResource("DealerSocket.Web.WebForms.Controls.CSharp.datePickerSC.js", "text/javascript")]

Open in new window


The above works fine if the datePicker.js file is in the "root" or at the same level as the webcontrol.cs file.

But how does the WebResource path change if the .JS file is inside a folder?

[assembly: WebResource("DealerSocket.Web.WebForms.Controls.CSharp  <<< folder path >>>datePickerSC.js", "text/javascript")]

Open in new window



This

root

vs this:

folder path
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Web developer
Commented:
http://www.codeproject.com/Articles/217176/Embedding-and-inlining-resources-in-ASP-NET-Web-Co

Apparently it is the "dot" separator:

Taken from the above link:

The second part is the path within the project folder structure. In our case, the files are placed in the Resources folder in the root of the project; therefore the part of the name is just Resources. In more complex structures, a dot is used as the path separator. The third and last part is the file name, including the extension. In the above example, it’s FlagBlue.png.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial