Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 06, 2009 03:43 AM by Nai-Dong Jin - MSFT
Feb 02, 2009 08:45 AM|LINK
This is a question about something that I've been wanting to do, but not something I desperately need. I've been writing a number of asp.net projects that needed dynamically generated images. I've just been using an aspx for this, but clearly there has to
be a more elegant solution. Ideally, I could package the whole thing in a custom server control, both the linking and the generating. The scenario would be approximately:
Pretty much I need a webresource.axd for dynamic images. How would I go about doing this? Is there a way to assign a delegate to a handler? Has anyone done this before?
Feb 06, 2009 03:43 AM|LINK
Pretty much I need a webresource.axd for dynamic images
From your description, it seems that you want to use webresource to show your images dynamically, right? WebResource.axd is a special handler in ASP.Net. In your scenario, you can create an HttpHandler to match your requirement. In your handler, you can
recieve a parameter which stands for the resourceid you want to get, and then, print out the image directly from the handler, here's an sample on how to achieve that.