Taget fra
http://www.aspupload.com/manual_misc.htmltext.asp
<HTML>
<BODY>
<h3>File Downloads</h3>
Click on this link to download a file:<p>
<A HREF="text_download.asp">test.txt</A>
</BODY>
</HTML>
text_download.asp
<%
' AspUpload Code samples: text_download.asp
' Invoked by text.asp
' Copyright (c) 2001 Persits Software, Inc
' This file must not contain any HTML tags
Set Upload = Server.CreateObject("Persits.Upload")
' Build path to file
Path = Server.MapPath("test.txt")
' Parmeters:
' 1. Path to file to download
' 2. Yes, build content-xxx headers
' 3. Use this value for Content-Type header
' 4. Include the word "attachment;" to Content-Disposition to force download
Upload.SendBinary Path, True, "application/octet-binary", True
%>
Normalt ville man kalde på denne måde i stedet.
<A HREF="text_download.asp?file=enFil.pdf">enFil.pdf</A>
også hente filnavnet med request.querystring("file") på text_download.asp siden.