Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: How to make a browser save a file for download


Message #1 by "Michael Morisoli" <Michael@M...> on Mon, 18 Dec 2000 18:19:23 -0800
I don't think this can be done...the browser is requesting the .asp file,
you just happen to be streaming binary content back.

You could try (but no promises on how this might work) using
Response.AddHeader to add a HTTP Location header which points to the .csv
file...

http://www.ics.uci.edu/pub/ietf/http/rfc2068.txt
(see section 7 on Response, and section 14.30 on Location)

Cheers
Ken

----- Original Message -----
From: "Michael Morisoli" <Michael@M...>
To: "HTML Code Clinic" <html_code_clinic@p...>
Cc: <steveb@w...>
Sent: Wednesday, December 20, 2000 8:19 AM
Subject: [html_code_clinic] Re: How to make a browser save a file for
download


Steve the content-type change worked perfect except that when the prompt
comes up to save the file, it defaults to the asp file name instead of
the csv file.

Any ideas on how to default the file name for the File Save As dialog
box?



--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to html_code_clinic as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-html_code_clinic-$subst('Recip.MemberIDChar')@p2p.wrox.com

  Return to Index