Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"click here to download"

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
US
I want my users to be retrieve a small executable file from my web page. I want the page to say something like "click here to download myapp.exe".

In .asp, how do I say "when the user clicks this hyperlink, push the .exe out to them"?
 
You need to put your exe into a directory (in the sample it's called "src")on your web server and then write the following html:
Code:
<a href=&quot;/src/myExe.exe&quot;>Click here to download</a>
 
There are two ways to do so

1. in the asp file where you have the link:
<a href=&quot;myapp.exe&quot;>click here to download</a>
when user clicks on the link, the browser will download that file and let user chooses between &quot;Save&quot;, &quot;Open&quot;, &quot;Cancel&quot;.

2. <a href=&quot;pushtouser.asp&quot;>click here to download</a>
when users click on the link, pushtouser.asp will open the file, read the content, collect other information (size, name ...) then Response.BinaryWrite(content) to the browser.

The first way is the easiest way.
 
Yeah, I figured it out myself about three minutes after posting this thread. You can even do it using FrontPage, so its really kids stuff. It surprises me that its so easy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top