If the error is "cannot convert from object to byte array" then of course,
what you need to do is to convert from object to byte array. The way you're
getting the data from your DataReader (I presume it's a DataReader?) is
always going to return a type of Object. Instead, use the (not sure which
type of DataReader you're using - I'll go with SqlDataReader)
SqlDataReader.GetByte() method to return the value as the correct type.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
"shin" <as**@hotmail.com> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
hi i am trying to output an image which i have in a database.
but this gives me errors
byte[] Picture;
Picture = (dr["logo"]); //cannot convert from object to byte
Response.Buffer=true;
Response.ContentType = "Image/JPEG";
Response.BinaryWrite(Picture);
how do i output images at a specific position?
do i need to use an image control?