473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Download a file

Hi!

I need to have script that automatic download files (open a "save file
dialog box") based on a variable (value in the URL).

Example:
files.asp?file=1 shall automaticly download file1.mp3 (open a dialogbox for
saving file1.mp3)
files.asp?file=2 shall automaticly download file2.mp3 (open a dialogbox for
saving file2.mp3)
Hope someone PLEASE can help me!!!

Regards
Øyvind Isaksen

Jul 19 '05 #1
3 1750
http://www.aspfaq.com/2161
(fn can be fn = request.querystring("filename") etc.)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Øyvind Isaksen" <oy****@webressurs.no> wrote in message
news:#F*************@TK2MSFTNGP09.phx.gbl...
Hi!

I need to have script that automatic download files (open a "save file
dialog box") based on a variable (value in the URL).

Example:
files.asp?file=1 shall automaticly download file1.mp3 (open a dialogbox for saving file1.mp3)
files.asp?file=2 shall automaticly download file2.mp3 (open a dialogbox for saving file2.mp3)
Hope someone PLEASE can help me!!!

Regards
Øyvind Isaksen

Jul 19 '05 #2
just have the page read the value and redirect to the file. It will open
(prompt for save) automatically.
If you really want you could also stream the file (see
http://www.darkfalz.com/1098/ or www.aspfaq.com)
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Øyvind Isaksen" <oy****@webressurs.no> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi!

I need to have script that automatic download files (open a "save file
dialog box") based on a variable (value in the URL).

Example:
files.asp?file=1 shall automaticly download file1.mp3 (open a dialogbox for saving file1.mp3)
files.asp?file=2 shall automaticly download file2.mp3 (open a dialogbox for saving file2.mp3)
Hope someone PLEASE can help me!!!

Regards
Øyvind Isaksen

Jul 19 '05 #3
> just have the page read the value and redirect to the file. It will open
(prompt for save) automatically.


Actually, an MP3 will probably load right into media player, and maybe even
right within the browser (the media toolbar or whatever nonsense that
became) -- depending on the user's preferences for the media player.
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Brandon Walters | last post by:
I wrote a file download module for my website. The reason for the file download module is that my website downloads work on a credit based system. So I need to keep track of and limit daily...
0
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog...
0
by: Rhys666 | last post by:
Basically I have a link that opens my download page and the querystring identifies the type of 'template' Excel spreadsheet has asked to download. The download page reads the querystring,...
4
by: Nathan Sokalski | last post by:
I want to give visitors to my site the option of downloading a generated ..txt file by clicking a button. I know how to generate text files, but how do I cause the browser to pop up one of those...
1
by: a.r.austin | last post by:
Hello, I am trying to download a few files one after another from a remote server. Problem is that I don't know how to, or if I am able at all, set a time out for download. I don't want to time...
3
by: tshad | last post by:
I have a function that downloads a file to the users computer and it works fine. The problem is that I then want the program to rename the file (file.move) to the same name plus todays date. ...
16
by: matt | last post by:
I have used some free code for listing files for download, but I want to send an email to the administrator when the file has been downloaded. I have got some code in here that does it, but it will...
0
by: kain razial | last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT TEKLA XSTEEL V 12 DOWNLOAD LINK. http://www.sendspace.com/file/zem32r
0
by: kain razial | last post by:
ANYOTHER NEEDS ALSO CONTACT ME.I WILL HELP YOU TO GET THAT TEKLA XSTEEL V 12 DOWNLOAD LINK. http://www.sendspace.com/file/zem32r
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.