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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top