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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top