All Experts, please HELP!!

  • Thread starter Thread starter P.D.
  • Start date Start date
P

P.D.

How's it?

I have a web form with a meta tag to make it refresh
every four seconds:

<meta http-equiv="Refresh" content="4">

This works ok on its own, but if I put in the following
line in the code behind file (Page_Load() method), the
page won't refresh itself:

bmp.Save(Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Jpeg);

(bmp is a Bitmap instance).

It looks like if you write to the Response output stream,
it screws some (or all) of your meta tags!!

Can anyone shed some light??

Thanks
P.D.
 
You are mixing ContentTypes here. You are streaming the image to the response, and also expect to see HTML.

What you need to do is stream the image from a different ASPX page, and link to that ASPX as if it were a physical image file so you can use the <img> tag.

I.e.:

<img src="streamimage.aspx?id=3" />

Hope that helps.

Regards,
Wim Hollebrandse
http://www.wimdows.net
http://www.wimdows.com
 
Back
Top