Link to home
Start Free TrialLog in
Avatar of odubhgaill
odubhgaillFlag for Ireland

asked on

ASP.NET - displaying image from database in gridview

Hi,

I am storing images in a database and want to display them in a gridview. It appears that the Imagefield in the gridview will not directly display image data from the database.
What is the best way to display the images in the gridview?

Rob
Avatar of Velio
Velio
Flag of South Africa image

- add an <asp:Image> to a template field in the grid view

- in the ItemDataBound, take the image data from the datasource, load it into a Bitmap object, if necessary, and save it in a file on the server.

- bind the image url to the saved file.
ASKER CERTIFIED SOLUTION
Avatar of madhevan_pillai
madhevan_pillai
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial