Author: Gary Frank | Posted on: 11/14/2008 6:53:12 PM | Views : 260

A VS 2008 ASP.NET C# program accesses a database.  Images are stored directly in a database table in varbinary(MAX) format.  The image itself, not a URL of an image file, is stored in the database.  An image is selected from the database and copied into a C# byte[] variable,  a byte array, with the use of a MemoryStream.  I would like to load the image from the database into an image control.

I can convert the byte[] into a Bitmap object.  Then I would like to load the Bitmap into the image control.  However, all I see is a imageURL property for the image.  Do I have to write the image to a disk file so that the image control's imageURL property can be used to load the file?  I would really prefer to load the image directly from memory.  It would be much faster than having to create a disk file, then read the file fr ...

Go to the complete details ...