I have my images stored in a database and I have a web form that reads the images from the database and returns them back as a stream. For example, if I call frmDocumentImageLoad.aspx?DocumentImageID=5, this will return a JPEG stored in the database in record #5. I can then add an ASP.NET image control to the page and set the ImageUrl property as follows:
<asp:Image runat="server" ImageUrl="~/frmDocumentImageLoad.aspx?DocumentImageID=5" />
This results in the image being displayed correctly.
My question is: Can I bind the WebImageViewer control to a URL like in the above exaple, or does the ImageUrlField of the data source have to contain an path directly to an image file? Also, can the WebImageViewer control display TIFF images as well as GIF, JPEG, etc.?
Thanks, Chuck
can you post your code for the imageveiwer please?
The answer to both of my questions above is "yes." I found out you can use any URL for an image as long as that URL returns a valid image. I also display TIFF images without problems (the images that can be diaplayed by the control are probably only limited by what the browser can display). The reason I was having problems with the WebImageViewer control is that my AJAX ScriptManager control was incorrectly placed within a PlaceHolder control that was initially invisible (and not rendered) when the web form first loaded. Moving the ScriptManager control to an appropriate location allowed the WebImageViewer control to function properly. And I have to add this is a very nice control. Our application uses it to allow the user to scroll through thumbnails of scanned documents. Thanks, Chuck