Hi,
I have created a custom web control which uses embedded images via an embedded style sheet, so both images and the stylesheet are part of the web control dll. The image is applied in the style sheet as following:
background-image: url(<%=WebResource('Namesapce.MyControl.Images.ImageName.gif')%>);
and the images and StyleSheet is added as the WebResource attributes in the AssemblyInfo, the StyleSheet flagged as PerformSubstitution = true
There is a funny thing going on, when the page is first loaded: the actual image is not "loaded" only until I hover the mouse over the actual image placeholder, in my case a div tag. The image is used as a header background colour and if i have many instances of a div having this image, it is enough to hover the mouse over one of the div instances and then suddenly the image is appears in all placeholders. Is this just the way WebResource works or I am doing something wrong?