I have uplaoded files in. the database.On the View page, I am showing the list of uploded file which is having links to view each downloded file, How can i open that file on link click. ( I don't want to Download it, I want to open it.),
I am using Binary format. in MVC
Thanks.
Nilesh JadavPosted May 9, 2017, 11:59 AM
Use this link :
http://www.compilemode.com/2016/09/download-binary-format-pdf-files-using-file-result-from-database-in-aspnet-mvc.html
For opening a pdf file : Refer this -
http://stackoverflow.com/questions/23035187/pdf-file-from-database-to-view-in-asp-net-mvc
Mohamed AbedallahPosted May 11, 2017, 1:23 PM
Most modern browsers like Firefox, Chrome and Edge have built-in plugins for displaying PDF files. With these browsers, you will probably be able to provide the file to the browser from your server and it will be displayed to the user.
If you want to display the PDF files using some control in your project, I recommend using a toolkit that has controls for loading PDF. You could do that if you don't want to rely on the default behavior of the browser, or if you want to use a browser that doesn't have support for PDF.
See these links for details:
https://www.leadtools.com/sdk/document/document-viewer
https://demo.leadtools.com/JavaScript/DocumentViewer/
https://www.leadtools.com/help/leadtools/v19m/dh/javascript/to/doxui-topics-documentviewer-using.html