Create and download file

T

Tim Cowan

Hi

I have a script in ASP 3.0 which creates a CSV file on the server. After the
code has run I want it to prompt the user to download the file (via the
browser). I have spent a frustrating hour trying this. Can anyone help?

Thanks

Tim Cowan
 
B

Bullschmidt

<<
I have a script in ASP 3.0 which creates a CSV file on the server. After
the code has run I want it to prompt the user to download the file (via
the browser). I have spent a frustrating hour trying this. Can anyone
help?
Perhaps you could use ASP to create a link to the new file.

Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
A

Alan Howard

To the OP - instead of saving it to the filesystem (unless you need/want to)
stream it to the browser (using Response.Write) after setting the content
disposition header. Alternatively, use an ADODB.Stream object to read the
file and stream it to the browser. Once again, set the content disposition
header using something like:

Response.AddHeader "Content-Disposition", "attachment; filename=" & Filename

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,158
Messages
2,570,881
Members
47,414
Latest member
djangoframe

Latest Threads

Top