I have an ASP.NET MVC4 application in which I'd like to export a html page to PDF-file, I use this code and it's works fine: code
This code converts a html page to online PDF, I'd like to download directly the file.
How can I change this code to obtain this result?
Make it as an attachment and give it a filename when returning the result:
What makes the file appear as attachment and popup the Save As dialog is the following line:
Use:
This is for VB.NET (C# below)
In your action method. Where PDFFIle is your file name.
For C#
With a FileContentResult: