473,594 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1427
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******@hotma il.com> a écrit dans le message de
news:%2******** **********@TK2M SFTNGP09.phx.gb l...
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="downl oaded.pdf"');

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

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"M. D'Costa" <me******@hotma il.com> wrote in message
news:##******** ******@TK2MSFTN GP09.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
9164
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 performing a redirect when I had left in print "Content-type:text/html\n\n";
0
1284
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 added, the one selected and the last one in the product file. The product file is a CSV file. The last entry is called BAD-Product. It is a debug entry during site
1
1674
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 = NULL;
5
3135
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 have tried POSTin to be able to view the image, then saving it, but it doesnt work, the problem i have is that all the files on the server have the same name, which is http://1.1.1.1/DH/repository/content.tif and for me to be able to view one, i...
1
4692
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 each cell within it to my code behind file which generates the HTML to display the data in a formatted text box, some of which is editable, some of which is not. The idea here is that the user can look at a page with a scrolling 'window'. Move...
10
2030
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 fine for .jpg images but for some reason it doesn't work with .gif images. The author of the article says it works fine for him but I can't get it to work. I was wondering if anyone here can shed some light?
4
6716
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 code ?? thank you Pedro Leite From Portugal ------------------------------------
6
6437
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) and be able to load them to an image webcontrol, but system.web.ui.webcontrols.image only seems to have a control to load the image from a URL. There's no way to load this directly without saving the image as a file and then using...
7
1082
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. One issue we have is that whenever a page is saved in the CMS, we grab the info about the user that is saving the page and save it along with the page (so we can track who has changed what). This works most of the time.
0
7947
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8242
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1486
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.