Embedding a CSS file in an assembly - can you access it from a Page?



I've been building a server control in an assembly and I want to embed
all the related resource files (.js, .css and .gif) within the
assembly DLL (along with the ASP.NET code). I have been able to
reference all these embedded resource files from the within the server
control class.

However, I have a base class that inherits from System.Web.UI.Page
that I will use as my base web form class. I want to be able to put a
CSS reference based on an embedded CSS resource in that base class
rather than the server control class - but I cannot get that to work.
Is there a way to do this?

I've been searching MSDN, Google, etc. for related documentation - it
appears to me that I'm doing everything right (I put my reference in
the AssemblyInfo.vb as I have with the other files, I set the Build
Action on the css file to Embedded Resource, I build a link reference
just as I am doing in my server control, etc.) Is there even a way to
do this - or does it only work from within a server control class

Thanks in advance for your help ...

Trevor Feldman


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