If the user has a plugin installed in their browser, the PDF file will be displayed in the browser. Otherwise, the user will be prompted to download the PDF file so that they can choose a program installed on their computer that can open the file.
If you want to display the PDF in another page, simply set the target of the hyperlink to "_blank"...like this:
- <a href="urlToPDF" target="_blank">PDF</a>
If you're using an ASP.NET HyperLink control, your code would look like:
-
<asp:HyperLink id="hyperlink1"
-
NavigateUrl="urlToPDF"
-
Text="PDF"
-
Target="_blank"
-
runat="server"/>
If you want it to be displayed within the same page, then you don't need to specify a target. This will replace the content being displayed in the browser with the PDF document.
If you want the PDF document to be displayed within the content of your page, then consider using an
<iframe />
to do so.
-Frinny