Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi I want to open file of type pdf/office/image in browser without showing up the save dialoge box. Have you got any idea on implementing it in C# asp.net.
Posted

1 solution

You need to have Content-Disposition as inline in Response Header.

Example given below...

1. How to open a file from browser by using asp.net c# code[^].
2. Re: Open inline files in web browser, ASP.NET[^].
3. Asp.net Open PDF File in Web Browser using C#, VB.NET[^].
 
Share this answer
 
Comments
Nick Fisher (Consultant) 18-Jun-13 7:37am    
Just as a heads-up, the 'inline' method does not seem to work in Explorer 8, and still shows the Open/Save dialog no matter what. I've tried other methods too, but cannot prevent the dialog from opening in IE8. :-/
Oh ok... Thanks for the info. IE 8 does not support many things.
We should ignore IE 8 in this case, I guess.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900