I have been spending some time now working on my first major web custom control. This control has images and a css file, so I decided to try and embed these into my control's assembly.
I added my images, made then embedded resources, referenced them in my AssemblyInfo and called them properly, and they are displaying great.
I did the same thing for my CSS file, and while it does display when I open my website with the custom control, I can get the CSS to display when in design time. Has anyone had any experience with this who can help.
My assembly has the following line added
[assembly: WebResource("CustomControlStyle.css", "text/css")]
And my custom control has the following code located in the OnInit method
string includeTemplate = "<link rel='stylesheet' type='text/css' href='{0}' />";
string includeLocation = Page.ClientScript.GetWebResourceUrl(typeof(MyCustomControl), "CustomControlStyle.css");
LiteralControl include = new LiteralControl(String.Format(includeTemplate, includeLocation));
Page.Header.Controls.Add(include);
Again, the css and images are both displaying when I view the site in my browser. However, when I'm in design time, the images show, but the CSS does not render. Any assistance on this would be greatly appreciated 