MemoryStream stream = new MemoryStream(); try { cnn.Open(); cmd = new SqlCommand("select pics from images", cnn); byte[] image = (byte[])cmd.ExecuteScalar(); stream.Write(image, 0, image.Length); Bitmap bitmap = new Bitmap(stream); Response.ContentType = "image/gif"; bitmap.Save(Response.OutputStream,System.Drawing.Imaging.ImageFormat.Bmp); } finally { cnn.Close(); stream.Close(); }
Parameter is not valid. Bitmap bitmap = new Bitmap(stream);
stream.Seek(0,0);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)