How to view the file in system default application (eg:doc file in Ms-word ...) without downloading the file?
Loading
How to view the file in system default application (eg:doc file in Ms-word ...) without downloading the file?
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.
Jignesh KumarPosted Mar 2, 2023, 8:28 AM
Hello Gopi,
Please refer this thread,
https://www.c-sharpcorner.com/UploadFile/87b416/reading-ms-word-document-display-in-the-page-in-Asp-Net2/
https://www.aspsnippets.com/Articles/Display-Word-document-in-Web-Page-View-in-ASPNet-MVC.aspx
Rajeev KumarPosted Mar 2, 2023, 6:38 AM
Hi Gopi Plz Check this-
Vishal JoshiPosted Feb 28, 2023, 7:01 AM
Hello Gopi
Please check the below documentation to open file pdf/word file in a browser without downloading.
https://learn.microsoft.com/en-US/troubleshoot/developer/webapps/aspnet/development/write-binary-files-browser-csharp
Thanks
Tuhin PaulPosted Feb 28, 2023, 2:23 AM
Hi Gopi,
To view a file in the system default application without downloading it, you can use the Process.Start method in C#. Here's an example code snippet:
This code will open the file located at filePath in the system's default application for that file type. For example, if filePath points to a .doc file, it will be opened in Microsoft Word.