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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Downloading a file using ASP request...

Status
Not open for further replies.

WebDes

Programmer
Jul 9, 2006
2
GB
Hi,

I have a script which records how many times a file has been downloaded. Then the file is automatically downloaded.

I pass the filename like this:

download.asp?file=document.pdf

The code in download.asp is: (minus the database code as it's quite long)

'
'
Response.Redirect("/documents/" & Request("file"))
'
'

Clicking with the left mouse button works fine in all browsers, but there is always going to be someone who clicks with the right, and selects 'save target as' This works in IE and Opera, but Firefox saves the file as 'download.asp' If the asp extension is then renamed to .pdf the file opens okay.

Does anybody know how to get Firefox to download the file with the correct name and extension?

Many thanks.
 
what if you give just them a button to click to download the file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top