|
Home > Archive > IIS ASP > March 2006 > Using the Response object to download files
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using the Response object to download files
|
|
| Roger Withnell 2006-03-27, 9:04 am |
| 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
| |
| Bob Barrows [MVP] 2006-03-27, 9:04 am |
| 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"
| |
| Anthony Jones 2006-03-27, 9:04 am |
|
"Roger Withnell" <rogerREMOVE@THISupperbridge.co.uk> wrote in message
news:1143410971_7939@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
|
|
|
|
|