Look at the ImageUrl
attribute. Normally this would be the URI of the image, but in your case you want to put the file contents in directly.
There are a few things that need to be done to get this to work:
1. You have to tell the image control that you are giving it data (prepend with "data:")
2. You need to tell the image control what type of image it is (eg "image/gif;")
3. You need to tell the image control the data format (eg: "base64,")
4. You need to give the image control the data in that format.
The content of that ImageUrl
as a string would then look something like
string img = "data:image/gif;base64," + Convert.ToBase64String(<%#Eval("image"));