Posted on: 2/17/2014 6:57:42 PM | Views : 706

I have tried several methods for opening and displaying a PDF document when the user clicks a button in my ASP.Net web page.  The various methods include:
1. Dim filepath As String = My.Settings.UserInstructionsFile
Response.ContentType = "application/pdf"
Response.WriteFile(filepath) 2. Response.Redirect(My.Settings.UserInstructionsFile) 3. <asp:HyperLink runat="server" ID="pdfHyperLink" NavigateUrl="~/SiteData/UserInstructions.pdf" Text="View User Instructions" Target="_blank"/>
All result in one error or another pertaining to resource not found or path not valid. I could really use some help on this
I should add that the Setting for the file path is: ../SiteData/UserInstructions.pdf
The error I get when using the <asp:HyperLink method for displaying the PDF file is:
404 - File or directory not found. The resource you are looking ...

Go to the complete details ...