I have a control created in a Class Library and i开发者_高级运维t should be styled by default with some CSS. I've created a CSS file, added it to the library and I am embedding it as a resource, so that it can be used for the default styling.
The CSS file contains some classes that set the background-image property. The images used for this are added as embedded resources in my library as well. As expected, the CSS will run correctly, but it will not display the images since they are added relative to the css file, so a request for ../images/my_image.png will result in a 404 since it actually does not exist as my_image.png, but downloaded as a .axd resource.
Any ideas on how to overcome this?
Any and all help is greatly appreciated.
Kali.
Why not having done this myself I remember reading an article for getting the javascript in an embedded resource.
Accessing Embedded Resources through a URL using WebResource.axd https://web.archive.org/web/20211020131200/https://www.4guysfromrolla.com/articles/080906-1.aspx
精彩评论