How to embed dynamic generated image into HTML?

Discussion in 'ASP .Net' started by Olav Tollefsen, Mar 1, 2004.

  1. 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
     
    Olav Tollefsen, Mar 1, 2004
    #1
    1. Advertisements

  2. Did you try setting the source of the image tag to the ASPX page that
    generates the image.
     
    Peter Rilling, Mar 1, 2004
    #2
    1. Advertisements

  3. So, I can't do it from a single page?

    Olav

     
    Olav Tollefsen, Mar 1, 2004
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.