|
 |
asp_web_howto thread: Forcing browser to Save As with specific file name
Message #1 by "Brian Lowe" <brian.lowe@i...> on Wed, 27 Mar 2002 13:27:00
|
|
I can reliably get the client browser to pop up the standard
Save As dialog to download a file (simply by setting the
MIME type to 'application' with a
Response.ContentType = "application"
statement.
My problem now is that even if I'm sending foo.dat the file
name that appears in the dialog is the name of my .asp page.
Is there something I can send in the response to give the
browser a file name other than the script it called?
Brian Lowe
---------@
Message #2 by "Tim Morford" <tmorford@n...> on Wed, 27 Mar 2002 08:52:40 -0500
|
|
Response.AddHeader "Content-Disposition","attachment;filename=foo.dat"
Tim Morford
http://www.aspalliance.com/tmorford
-----Original Message-----
From: Brian Lowe [mailto:brian.lowe@i...]
Sent: Wednesday, March 27, 2002 1:27 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Forcing browser to Save As with specific file
name
I can reliably get the client browser to pop up the standard
Save As dialog to download a file (simply by setting the
MIME type to 'application' with a
Response.ContentType = "application"
statement.
My problem now is that even if I'm sending foo.dat the file
name that appears in the dialog is the name of my .asp page.
Is there something I can send in the response to give the
browser a file name other than the script it called?
Brian Lowe
---------@
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by "Brian Lowe" <Brian.Lowe@i...> on Thu, 28 Mar 2002 09:31:10
|
|
> Response.AddHeader "Content-Disposition","attachment;filename=foo.dat"
Does just what I wanted.
Thanks
Brian Lowe
---------@
|
|
 |