Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
110 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:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
Tom 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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