I have a database which contains many columns, one of the columns is an image column , this contains the image of a particular person in raw format. I want to put this image on datagrid view in C# . I am able to show all other data except the image.
2 Answers
You can use handler to display image in gridview , your html markup look like inside
Gridview ItemTemplate set image control src as src=~/ShowImage.ashx?id=" + id
where ShowImage.ashx is your handler which return MemoryStream((byte[])img);
Here is a similar article how to get binary data and display as image
In your case your querystring is characterID
so your image src would be src=~/ShowImage.ashx?id=" + characterID