Click to See Complete Forum and Search --> : Displaying Images in Repeater ...


netsearcher2000
March 20th, 2005, 09:55 PM
Hi guys,

I am facing a problem of displaying images in using Repeater. To express clearly my trouble, I describe it behind:

I have a table tblPicture created in Microsoft SQL Server 2000. The tblPicture contains only two fields: ID & Picture. So you can see:

tblPicture:
----------------ID : Int
----------------Picture : Image


Could you please give me some suggestions to solve it...I have a headache with it...:D. Thanks indeed.

cmiskow
March 21st, 2005, 12:49 PM
Create a new ASPX page that takes image ID as a querystring. In the Load event of this page, get the image data from the DB, set the response content type to the MIME type of your image and output the image data.

In your repeater, add an ImageControl, and set the image URL to the ASPX page created above with the querystring variable set to the desired image ID.