I have seen applications doing something like this:
getphoto.aspx?key=B59273C3BB30A9AD7AD5
Instead of using the web service to transfer the byte array back to the
client, it generates a URL with a uniqueue key and feed that back to the
client. Then the image is fetche as you suggested dynamically when the
browser requests the URL. In addition, the key expires after a while to keep
access control to the server.
How do you implement something like this? Is it easily supported by the .NET
framework or do I have to do a lot of hand-coding for this scenario?
Olav
"Matt Berther" <mb******@hotmail.com> wrote in message
news:OM****************@TK2MSFTNGP12.phx.gbl...
Hello Olav,
An image is going to constitue another request, so what you'll need do is
assign the Image URL to a page or handler in your website. This
page/handler will have code something like this:
byte[] buffer = someMethodToGetTheByteArray();
Response.ContentType = "image/jpeg";
Response.BinaryWrite(buffer);
Response.End();
--
Matt Berther
http://www.mattberther.com
I'm getting an array of bytes returned from a web service representing
a jpeg image. How can I display this on an asp.net page? The Image
control seems only to take an URL as a paremeter.
Olav