Thanks.
I did some test and found out the debug mode affect the cache. I am not quite sure some of your wording like "while when it is on it is always cached". I thought when debug is off, it will be cached. Anyway, I think that is what you mean. I have two more questions, hope you can give me some idea.
1, It is nice to use webresource.axd on all my other resources, like js, images. But as you wrote in your article, it is not easy to call a assembly resource. What about just some other file, for example, the js file and image file my usercontrol will reference? I don't think I create assembly for my usercontrol.
2, I found on every page visit, my static images will be called, like /images/spacer.gif, images is one static folder. From fiddler I can tell the cache-control is set to private, which is right, but I don't see expiry date set as I set on IIS (several days later from now). I guess that is why it calls every images on every page visit. Do you have any idea why the expiry setting on IIS doesn't work?
thanks!