You'll need to create a new aspx page that feeds the image. You can't output image binary data directly to the page, you can only provide a URL for the image. So you would need to provide an image url that looks likes this:
companylogo.aspx?companyID=123
Inside of companylogo.aspx you will have to read the database again and extract the binary data, then write it out to the page using BinaryWrite(). Here's a snippit from a page I use that does this:
Response.Clear()
Response.ContentType = "image/jpeg"
Response.BinaryWrite(objStream.ToArray)
Response.Flush()
objStream is a memory stream object that I'm creating from multiple source, but non of which are a database so I can't provide much help with doing that specific piece.
Peter
------------------------------------------------------
Work smarter, not harder.
|