Force download Part 2

T

tma

I'm trying to add anchors in code and I need the link to force a download of
the .pdf rather than open a new window or worse, open the file in the
current client browser window. Is there something I can change about the
anchor itself to force this behavior? I did not have any success with the
"content-disposition" articles suggested.

Here is my very normal anchor code:

a = New HtmlAnchor

a.HRef = "http://www.someURL/Registration.pdf"

a.InnerText = "Print Application"

a.Target = "_blank"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top