✔ 最佳答案
You use pure html to download a file.
<a href="
http://www.abcdefg.com/download.zip">Download File</a>
With asp.net hyperlink control
asp_hyperlink_control.NavigateUrl = "
http://www.abcdefg.com/download.zip"
asp_hyperlink_control.Text = Download File
You cannot hide the path. Wthout the path, how does the browser know where to send the request to?
The best you can do is to put the download code in an external javascript file. The script tag points the src to the javascript file.
<a href="#" onclick="downloadFile()">Download File</a>
In external javascript file:
function downloadFile()
{
document.location.href = '
http://www.abcdefg.com/download.zip';
}
2007-10-01 12:29:05 補充:
The best way is to require the user to supply a password before he can go to the download page.