My guess is that you are passing the imageID as a querystring parameter thats
how you would know what image to pull from your database. So, if this is the
case you can do this
<asp:image runat="server" id="myimage" ImageUrl="[filename].aspx?id=1" />
where filename = the aspx page that you are streaming the image file to
using the Response.output .stream. This worked for me. To play around with
the sizing you have to look at the image Thumbnail class from the
system.drawing. imaging (I think this is the namespace) and modify the image
width and height like that. What I did was to also include the width and
height as a querystring parameter so my sorce code looked something like this:
<asp:image runat="server" id="myimage"
ImageUrl="[filename].aspx?id=1&widt h=200&height=20 0" />
I suggest you create a single aspx page that handles all of the image
processing and resizing and streaming out to the browser. This single page
will be the [filename].aspx that you are setting the ImageUrl to point to.
Hope this helps.
"Stephen" wrote:
Hi,
I am using an Access database (OLE Object) and storing Image as a bytes
after streaming. I am able to read it back as a stream and display it on the
browser using the following code:
Response.Output Stream.Write(fi leData, 0, fileData.Length )
it displays on the browser as an image, but I want to display it in an Image
(web control image) so that I can manipulate its size.
How can I do this?
Please advice,
Stephen.