I am trying to make a button, that when clicked, downloads a src defined pdf. The problem I have is when I make a button is that in IE it opens in an embeded reader instead of downloading it. I was advised to use a content-disposition header. I am running on a asp.net server, but I only know HTML, JS, and CSS. My question is how do I implement this?
This is what I think I am supposed to do:
In a file: example.html
<!-- begin document -->
<%
some sort of asp.net code about content disposition goes here
%>
And then my html code goes here
<!-- end document -->
Is this the right idea?
And if so, what am I supposed to put for the asp.net code?
First create a index.html file:
After, create a get_pdf.aspx:
And after put you pdf with the others files. You server folder ‘ll have the following files: