Hi,

Currently we are using asp.net 3.5 with sql server 2005.

We are display the sql server image in to <img> tage.It's diplay in IE 6 lower version,but in IE 6 higher not working.this is actual coding we are using

Dim myDataReader As SqlDataReader
            myDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

            Do While (myDataReader.Read())

                Response.ContentType = "image/gif"
                Response.BinaryWrite(myDataReader.Item("IMAGECONTENT"))

            Loop

thanks

BY

shan

Hi,

Change Response.BinaryWrit() as follows and try it.

Response.BinaryWrite(DirectCast(myDataReader.Item("IMAGECONTENT"), Byte()))

or

Response.BinaryWrite(CType(MyDataReader.Item("IMAGECONTENT"), Byte()))
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.