473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Using the Response object to download files

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
2 1666
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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Claus Pedersen | last post by:
We are building a webapplication but keep hitting a wall: The user can download files but we need to check if they are authorized to do so. We do this with a download-page and use the following...
4
by: Ali | last post by:
I need a functionality where my clients download Excel files and after they do, I do some processing. Downloading is easily achieved using a anchor or hyperlink tag, but that does not give me the...
11
by: Dorsa | last post by:
HI, Could you please tell me the error in here. I am trying to open an XML file from a link. Response.Clear() Response.Expires = 0 Response.BufferOutput = False Response.ContentType =...
5
by: Earl Teigrob | last post by:
My company sells software and wants to provide downloadable product. Some of these downloads will be full CD's of over 550M I had everything working fine using Response.filewrite() but when we...
2
by: hoenes1 | last post by:
I've got an aspx-Page "SendFile.aspx" which is called by a Link on "ShowListOfFiles.aspx" and sends the file in the OnLoad Eventhandler. The filename to download is stored in a Session variable....
1
by: Charlie | last post by:
Hi: I'm uploading documents into a SQL Server Image field and using Response.BinaryWrite() to download or view them in the browser. Some doc types like Adobe Illustrator and Photoshop files...
2
by: STEVE.KING | last post by:
Greetings: I need to download an executable and some other binary files (a C++ DLL) from a virtual directory in my WinForms application. No-Touch Deployment manages my .NET code fine but...
4
by: Hexman | last post by:
Code below ---- I've asked a similar question on this forum earlier. This is a slightly different situation. Previous Question ---- I'm trying to save some specific web pages to disk as...
3
colinod
by: colinod | last post by:
I am trying to get my site to download mp3 files without having to right click - save as on a link. I have found this code, which works as long as the file names are short, if they get a bit long it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.