473,395 Members | 1,639 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,395 software developers and data experts.

Downloading file dialog box prompted twice

Ben
Hi

I used the following method to output to a word doc

Response.Clear()
Response.ContentType = "application/vnd.msword"
Response.AddHeader ("Content-Disposition", "attachment;filename=list.doc")
...

The 'File Download' dialog box is prompted. After selecting the 'Open' button, the 'File Download' dialog box is however prompted again, and the 'Open' button has to be selected again before opening the doc

How to avoid the 2nd prompt? Is it something to do with the client browser setting or the AddHeader setting

Thanks
Ben
Jul 21 '05 #1
0 681

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
3
by: Guy Penfold | last post by:
Hi All, I have an asp.net 1.1 application that includes a rudimentary contacts database that must support importing from and exporting to Outlook. The file upload part works fine, but I'm having...
4
by: Dorte | last post by:
Hi, I am using the code below to stream a CSV file with the response object. Dim FileName As String = "Test.csv" With Web.HttpContext.Current.Response ...
1
by: Bernard Matthews | last post by:
I'm using the following code to stream a CSV file download to the client browser - HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.ClearContent();...
1
by: Patrick Olurotimi Ige | last post by:
When i have a link like :- <a href="sample.xls">download</a> And i want to download ..by clicking the download link it POPS(saying would u like to save or open the file!!) up a dialog box .. But...
0
by: Ben | last post by:
Hi I used the following method to output to a word doc Response.Clear() Response.ContentType = "application/vnd.msword" Response.AddHeader ("Content-Disposition",...
5
by: fniles | last post by:
We created an ActiveX control and marked it as safe for scripting using Implements IObjectSafety. We then created a CAB file and signed it using Verisign. We also created a license file (LPK file)...
4
by: Satya | last post by:
I am trying to display a PDF file (which I am being passed from a web service as a binary stream) in a browser, but I am being prompted to save the file instead. I don't want the user to be...
0
by: Server Control | last post by:
Hi, I am exporting my datagrid to Excel using the standard Export to Excel Method using : dg.RenderControl(). and Page.Response.AddHeader("Content-Disposition", "attachment;filename=" +...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.