Your can convert pdf file in to byte array By following code
byte[] array = new byte[file.ContentLength];
file.InputStream.Read(array, 0, array.Length);
By following code you can recheck the file
System.IO.File.WriteAllBytes(@"c:\test.pdf", array);
store the byte array to database easily.
and also read the byte array and export as follows ...
Response.Clear();
MemoryStream ms = new MemoryStream(pdfBytearray);
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=labtest.pdf");
Response.Buffer = true;
ms.WriteTo(Response.OutputStream);
Response.End();
Following is the refferance link
http://stackoverflow.com/questions/1324597/how-to-render-an-asp-net-mvc-view-in-pdf-format?rq=1[
^]
http://stackoverflow.com/questions/7747796/displaying-pdf-files-in-a-web-page-from-a-sql-database-directly-without-needing[
^]
http://www.c-sharpcorner.com/UploadFile/013102/save-and-read-pdf-file-using-sql-server-and-C-Sharp/[
^]
Convert a byte array to pdf in c#[
^]