Posted: 10/5/2011
I have decided to use the CssSpriteGenerator code to automaticallty generate image sprite in my ASP.net 4.0 website [http://www.codeproject.com/KB/aspnet/cssspritegenerator.aspx]. I have encountered a problem that I can't solve. I will explain. I am storing all my icons (to be used in the sprite generator) in the "img/icons" folder. I've configured the web.config with the appropriate configuration. I want all the files in the img/icons folder to be used for the sprite and those who appear in the x.aspx to be inserted into the sprite and their images converted. I am using the following CssSpriteGenerator configuration:
The problem is that I can't get the code to work, means that the images stay as they are. I tried other options but I only get mt logo.png (which is on the masterpage) to be replaced with a CSS Sprite. I wanted to know what type of configuration I need to use in order for it to work. Please help me out, I'm breaking my head for hours on this one. Thanks in advanced.
Why are you going for 'on-fly' option? You can generate the sprites via online tools http://spritegen.website-performance.org/