Attempting to view pdf file though iframe using jQuery modal popup
问题 I am trying to display a pdf file though iframe using jQuery modal popup, however, it's asking the user to download the file when the page loads instead of the pdf file being embedded inside the iframe when the modal dialog opens up. How can I get around this? 回答1: I'm using MVC to output the pdf file, and to open instead of downloading, I used this: Response.AddHeader("Content-Disposition", "inline; filename=mypdf.pdf"); For the sake of viewing it inside a dialog I choose to use an iframe