Issue saving csv file from asp page

M

M. D'Costa

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
 
H

Hermit Dave

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top