Include Assets in Library

S

shapper

Hello,

I am working on a web control library.

How can I include my CSS Files and images in the DLL library?

I would like to be able to move only the DLL file to the web site Bin
Folder and not have to copy all CSS Files and Images.

Thanks,

Miguel
 
H

Hans Kesting

shapper brought next idea :
Hello,

I am working on a web control library.

How can I include my CSS Files and images in the DLL library?

I would like to be able to move only the DLL file to the web site Bin
Folder and not have to copy all CSS Files and Images.

Thanks,

Miguel

You have to do several things:
1) change the "Build Action" (see Properties of the file in solution
explorer) to "Embedded Resource". This means it gets compiled into the
dll.
2) add a handler that accepts a filename, reads that from the
"resource" and sends it to the Response (I think you need
Assembly.GetManifestResourceStream)
3) change all references to use this handler

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Web Control and CSS Class 2
C# Library to Combine and Minify CSS and Javascript files 2
AutoComplete 1
Use library 1
Custom Control. How to start? 3
CSS and Asp.net 3.5 2
Speed web site 1
Control 1

Top