here is your answer...
diplay image in image control after retreiveing from database
I have read this article. and picture is also coming. But my problem is i could not bind it to image control. I cant assign
Response.BinaryWrite(myReader("Image")) to a string or byte variable.
Dim ImageID As Integer = Convert.ToInt32(Request.QueryString("ImageID"))
'Connect to the database and bring back the image contents & MIME type for the specified picture
Const SQL As String = "SELECT [MIMEType], [Image] FROM [Pictures] WHERE [ImageID] = @ImageID"
Dim myCommand As New SqlCommand(SQL, myconnection)
myCommand.Parameters.AddWithValue("@ImageID", 1)
myconnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
Dim mypic As Image
If myReader.Read Then
Response.ContentType = myReader("MIMEType").ToString()
Response.BinaryWrite(myReader("Image"))
End If
myReader.Close()
myconnection.Close()