Open pdf from asp.net

I have a PDF that I would like to open from an ASP.net project. I don’t want to go to the PDF file, but I want to keep the page open, but when the user clicks on the link, I want to open the PDF file on another page.

+3
source share
1 answer

You can open the PDF in a new window:

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

This will not host the PDF file, but rather serves the file for execution by the local viewer. This MAY be a plug-in browser or may be outside the browser.

+3
source

Source: https://habr.com/ru/post/1765921/


All Articles