how to pdf file only view not download in asp.net
how to pdf file only view not download in asp.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joaquin MartinPosted Jan 28, 2016, 10:53 AM
http://demo.leadtools.com/JavaScript/DocumentViewer/
Lisa WhitePosted Jan 10, 2016, 8:39 PM
Ajay GuptaPosted Jan 8, 2016, 7:03 AM
byte[] ar = new byte[(int)fs.Length];
fs.Read(ar, 0, (int)fs.Length);
fs.Close();
Response.AddHeader("content-disposition", "attachment;filename=" + AccNo+".pdf");
Response.ContentType = "application/octectstream";
Response.BinaryWrite(ar);
Response.End();
Jose SaizPosted Jan 8, 2016, 6:53 AM
How you tried embedding it?
Shweta LodhaPosted Jan 8, 2016, 3:05 AM
Please check below link, if it can help you:
http://www.c-sharpcorner.com/UploadFile/5089e0/how-to-open-pdf-files-in-web-brower-using-Asp-Net/