tony
tony

Reputation: 361

open pdf from asp.net page

I have PDF that I would like to open from ASP.net project. I don't want to navigate to the PDF, but I want to keep the current page opened but when a user clicks on the link, I want to open the PDF file in another page.

Upvotes: 3

Views: 5847

Answers (1)

p.campbell
p.campbell

Reputation: 100607

You could open the PDF in a new window:

 <asp:HyperLink  Target="_blank" runat="server" ID="linkBarPdf" Text="Open Bar PDF"
                 NavigateUrl="~/foo/bar.pdf">

This won't host the PDF though, but rather serve up the file for execution by the local machine's viewer. That COULD be a browser plug-in, or it could be outside of the browser.

Upvotes: 3

Related Questions