I have an asp.net MVC application that calls another service to generate a pdf. I want the user to be able to click a link in my View and get a ‘save as…’ dialog from the browser to save the pdf.
The call to the 3rd party service is made in a Model using WebClient.
How to get I the data from the WebClient call up to View and out to the browser so it can be saved?
Try this out
And of course the bytearray comes from the WebRequest you need to make to get the file