473,408 Members | 2,832 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,408 software developers and data experts.

Issue saving csv file from asp page

Hello,

I have an ASP.NET application that allows a user to save a csv file with
certain data they requested. The problem is as follows:

On my machine it works fine and prompts me to save the .csv file when I
click a webcontrol button.

On other machines, it prompts me to save the aspx file, which is the aspx
page that has focus. However, after this prompt, the csv file is correctly
saved, but this additional prompt of first saving the aspx page also
happens.

Can anyone tell me how to solve this issue of being prompted to save the
aspx page? I think it is a browser setting. I am using only Internet
Explorer.

Help will be appreciated.
Many thanks,
Marise
Nov 18 '05 #1
2 1416
You can try to force the donwload dialog using :

http://support.microsoft.com/default...NoWebContent=1

Note that it allows also to control the final filename ...

Patrice
--

"M. D'Costa" <me******@hotmail.com> a écrit dans le message de
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hello,

I have an ASP.NET application that allows a user to save a csv file with
certain data they requested. The problem is as follows:

On my machine it works fine and prompts me to save the .csv file when I
click a webcontrol button.

On other machines, it prompts me to save the aspx file, which is the aspx
page that has focus. However, after this prompt, the csv file is correctly
saved, but this additional prompt of first saving the aspx page also
happens.

Can anyone tell me how to solve this issue of being prompted to save the
aspx page? I think it is a browser setting. I am using only Internet
Explorer.

Help will be appreciated.
Many thanks,
Marise

Nov 18 '05 #2
you will need to add a header to Response. The header should be something
like

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

use Response.AppendHeader(name, value); to add the above header
--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"M. D'Costa" <me******@hotmail.com> wrote in message
news:##**************@TK2MSFTNGP09.phx.gbl...
Hello,

I have an ASP.NET application that allows a user to save a csv file with
certain data they requested. The problem is as follows:

On my machine it works fine and prompts me to save the .csv file when I
click a webcontrol button.

On other machines, it prompts me to save the aspx file, which is the aspx
page that has focus. However, after this prompt, the csv file is correctly
saved, but this additional prompt of first saving the aspx page also
happens.

Can anyone tell me how to solve this issue of being prompted to save the
aspx page? I think it is a browser setting. I am using only Internet
Explorer.

Help will be appreciated.
Many thanks,
Marise

Nov 18 '05 #3

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

Similar topics

2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
0
by: Roland Hall | last post by:
Scenario: E-commerce: User clicks on a button , item is added to cart. User can either continue shopping or view cart. The order here doesn't matter. When user views cart, two items are...
1
by: Sachin | last post by:
Hi, I am trying to save a file using the following code. MessageBox("Saving file","",MB_OK); _Module.m_pWebBrowser->get_Document(&pDisp); spHTMLDocument2 = pDisp; IPersistFile* pFile ...
5
by: Thaynann | last post by:
I have an app that (at the moment) moves through files that are on a web site, and deletes them, wat i want to do for the next stage, is to be able to download each file before i delete it. i...
1
by: Rhys | last post by:
I have a page which has an IFrame on it. The src of the IFrame is a page with a datagrid on it. The Datagrid has bound template columns. The columns of the datagrid pass the bound data value of...
10
by: David | last post by:
Greetings all, I am having a problem with an asp.net application using C# which is a thumbnail generator. Here is the code used... http://www.eggheadcafe.com/articles/20030515.asp It works...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
6
by: Mark Denardo | last post by:
My question is similar to one someone posted a few months back, but I don't see any replies. Basically I want to be able to have users upload photos and save them in a database (as byte data)...
7
by: darrel | last post by:
This is a long-overdue item on my punch list that I haven't had much time to address in the past. I'm trying to get it off my plate this week. ;o) We have a home-grown CMS that works pretty well....
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.