Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I need to generate some images on the fly in my ASP.net pages. Currently the only way I think I can do this is to have a page dedicated to generating image with the content type image/jpeg and then saving the image to the outputstream of the response. The in my main page pass this page as the src of an Img tag. I have 2 queries:

 

1. Is this the only/best way of displaying a dynamic image on a page?

 

2. What's the best way of getting data from the page to the image? If it was a small amount of data I could just put it in the querystring of the src url of the img tag but it's likely to be an array of variable length. I was therfore thinking of using the cache to save the data to perhaps under an id. The image generating page could then have the ID passed in the querystring and retrieve the data from the cache and finally remove it to free it up. Is this the best way of doing it? Can anybody think of any flaws?

 

Thanks.

 

:)

Please check the Knowledge Base before you post.

"Computers are useless. They can only give you answers." - Pablo Picasso

The Code Net

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...