By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 1,032 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

Using the Response object to download files

P: n/a
I'm using the Response object download files from an SQL Server table to the
client browser.

Having set the content type and AddHeader, I use Response.Write and the file
opens in the browser.

How do I get the ubiquitous panel, Open or Save this file to appear so the
use has this choice?

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Mar 26 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Roger Withnell wrote:
I'm using the Response object download files from an SQL Server table
to the client browser.

Having set the content type and AddHeader, I use Response.Write and
the file opens in the browser.

How do I get the ubiquitous panel, Open or Save this file to appear
so the use has this choice?

:-)
Usually people ask how to prevent this from appearing.
It's totally outside of ASP control. It should appear automatically when the
correct content type is used.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Mar 27 '06 #2

P: n/a

"Roger Withnell" <ro*********@THISupperbridge.co.uk> wrote in message
news:11*************@sp6iad.superfeed.net...
I'm using the Response object download files from an SQL Server table to the client browser.

Having set the content type and AddHeader, I use Response.Write and the file opens in the browser.

How do I get the ubiquitous panel, Open or Save this file to appear so the
use has this choice?

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Response.AddHeader "Content-Disposition", "Filename=SensibleName.doc;
attachment"
Anthony
Mar 27 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.