asked on
byte[] image = (byte[])dataset.Tables[0].Rows[0][0];
if (image.Length > 0)
{
MemoryStream astream = new MemoryStream();
astream.Write(image, 0, image.Length);
//System.Drawing.Image newImage=System.Drawing.Image.FromStream(astream);
Bitmap newimage = new Bitmap(astream);
Response.ContentType = "image/jpeg";
newimage.Save(newfolder);
Image2.Attributes.Add("src", newfolder);
}
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
You don't actually need to do any of that! All you need to do is set the contenttype and do a binarywrite of the array to the page:
Regards,
TimCottee
Open in new window