Solved

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

Posted on 2016-08-29
1
42 Views
Last Modified: 2016-08-29
[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
0
Comment
Question by:knowlton
1 Comment
 
LVL 5

Accepted Solution

by:
knowlton earned 0 total points
ID: 41775476
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now