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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top