I has image into byte[]. I need to open it into adobe file in asp.net. I using following code :
byte[] bytes = contractimage.Value.Bytes;
if (bytes == null)
{
Response.Write("Not found.");
Response.End();
}
else
{
Response.AddHeader("content-disposition",
"attachment;filename=statement" + contractGuid.ToString() + ".pdf");
Response.ContentType = "application/pdf";
Response.OutputStream.Write(bytes, 0, bytes.Length);
Response.End();
}
But this code display an error that adobe canot dispalay this file it may be corrupted. Please suggest