Embed js, css, images into separate assembly to read from asp.net web site

I'd like to create a class library project where embed resources like js, css and maybe image files. I would compile it and copy the dll into the bin folder of my web site to include the resources into my pages with GetWebResourceUrl.

I tried with an assembly that have no .cs files, but it doesn't seem to work, I can't see the namespace of the assembly in the web project.

Is it possible doing this? Someone could provide a small tutorial?



the best way to embed the files like js , css and ... to dll is to select the embedded resources in build action of file property. take a look at this:


by the way if you want to forbid any kind of unknown requests(out of you web site) to navigate the contents.

If you want to reduce the loading time, serve the media files as static content, as example over nginx.

Need Your Help

Vista UAC, Access Elevation and .Net

.net uac elevation

I'm trying to find out if there is any way to elevate a specific function within an application. For example, I have an app with system and user settings that are stored in the registry, I only need