how to link to a pdf document.

I need to have a hyperlink on my website which when clicked on will allow someone to download a pdf file, or display it if they wish.

However my syntax is incorrect and I can't figure out how to do it. I am using Asp.net which pretty much uses html. So any help would be appreciated.

       <a href="@Url.Content("~/Documents/information.pdf")">Click here to download a current copy of information</a>
LVL 2
brgdotnetcontractorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TalShyarCommented:
Why don't you just use plain old HTML:

<a href="/Documents/information.pdf">This is my link.</a>

Now assuming if the user has Adobe installed, the PDF will open / should open in-browser.

If you want to force the user's browser to download the file rather than opening it, check this out:
http://stackoverflow.com/questions/18339023/how-to-force-browser-to-download-not-view-pdf-documents-in-asp-net-webforms
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brgdotnetcontractorAuthor Commented:
I screwed up, and forgot to assign points. So it defaulted to 500 points. So I guess you are the lucky recipient. Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.