Last post Apr 04, 2008 06:31 PM by jkirkerx
Apr 04, 2008 10:17 AM|sandit27|LINK
I have an image in memory as a Bitmap. I want to render this image at runtime to the browser. I found a fantastic example at
http://www.eggheadcafe.com/articles/20050911.asp. Which says that, a custom control will render your image.
But the problem is it renders the image on Page_Load only. If I want to render this in-memory image then I cant do that...
Please can some body tell me a workaround or solution ?
Apr 04, 2008 11:51 AM|rmaiya|LINK
I am just curious why cant you use Http Handlers to do this?
Apr 04, 2008 06:31 PM|jkirkerx|LINK
At first I thought you were writing a custom server control to handle and write your image file to the browser screen.
Now I think you want to render the image in Code Behind, on a web form
Never the less, you have to take your image stream, and convert it to another object type, then use an existing image tag or asp Image control and assign the image object to it. You can create the Image control on the fly using new image.
Look for SQL Blobs, how to insert and extract images. It's the same in XML Code, where you can generate XML as a memory stream, butit has to be converted for use other than a stream.