I have a database of 9 images that are changing, so I can’t directly set the tag srcin html <img>to display 9 images, I have to select them from the database and link them accordingly.
I can get and print 1 image using Response.BinaryWrite(), but not all 9. My byte[]only gets the 1st image from db,
here is the code
while (dr.Read())
{
Response.ContentType = "image/jpg";
Response.BinaryWrite((byte[])(dr["fsImage"]));
}
How to get all 9 images and how to attach them to a tag <asp:Image>or build a dynamic html tag <img>dynamically
I am a newbie, so please calm down if there are stupid mistakes;)
Thanks in advance.
source
share