locked
Dynamically rendering an image in a bunch of HTML RRS feed

  • Question

  • User407250153 posted
    I see how to use Response.ContentType = "image/png" and Reponse.OutputStream along with an Image to render a page using my HttpHandler.  But I can only display the picture.  Whenever I try to put HTML tags around the picture, I get nothing displayed.  Is this possible and if so, how?
    Saturday, June 18, 2005 8:46 PM

All replies

  • User1152494133 posted

    Are you trying to send the image and html in the same stream?  If so, then you're not thinking in terms of how web pages work.

    First, the browser downloads the HTML.  Then, everything external to that HTML is downloaded individually from the web server (images, scripts, stylesheets, etc).

    So, it sounds like you already figured out the image part.  Now you just need a separate HTML page that contains a <img src='url-to-your-http-handler'> tag.  This should give you the desired results, assuming that I understand your problem correctly.

    Saturday, June 18, 2005 9:49 PM
  • User407250153 posted
    Yeah, you are right. My understanding isn't solid.  I just dabble around with ASP.NET which tends to hide the underlying workings.  Anyway, I think I get what you are suggesting.  I'll give that a try.  Thanks!
    Saturday, June 18, 2005 11:26 PM
  • User407250153 posted
    It works great.  Thanks!
    Monday, June 20, 2005 6:57 PM