Include Assets in Library

  • Thread starter Thread starter shapper
  • Start date Start date
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
 
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
 
Back
Top