How to embed dynamic generated image into HTML?

  • Thread starter Thread starter Olav Tollefsen
  • Start date Start date
O

Olav Tollefsen

I have som code that dynamically generates an image and writes it back to
the browser from an .aspx codebehind file like this:

System.Drawing.Image image;
image = GenerateImage();
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);

This works fine, but how can I use this image as a source for an server side
Image control defined in my .aspx file?

Olav
 
Did you try setting the source of the image tag to the ASPX page that
generates the image.
 
So, I can't do it from a single page?

Olav

Peter Rilling said:
Did you try setting the source of the image tag to the ASPX page that
generates the image.
 
Back
Top