can't show image from a DB in a repeater vb.net
Posted on 2011-09-03
I have a problem showing images from a DB, the images are saved like this from another site.
cmd.Parameters.Add("@img_type", OleDbType.VarChar).Value = imageType
cmd.Parameters.Add("img_stream", OleDbType.Binary).Value = imageContent
So the images is saved to the access db as Binary data. (that work)
Now i will show the images in a repeater like
<img src="face.gif" alt="" /> when looking on the serverside code.
but if i make the connection and the repeater and make this
<img src="<%# Container.DataItem("img_stream")%>" alt="" />
the code dont show the image, i have some text from the db and it ok, tha code show the text, but not the image.
Can someone help me, im new to this..