Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Saving a csv file through ASP.NET

Reply
Thread Tools

Saving a csv file through ASP.NET

 
 
M. D'Costa
Guest
Posts: n/a
 
      09-24-2004
Hello,

I am saving a csv file through an ASP.NET web application. The data is
obtained from a database and
saved to the local users machine.

I am using the Response objects methods of Addheader and ContentType. It
works fine on my machine to save the file, however on another machine
browser(Internet Explorer), it prompts to save the aspx page. When I say to
save the aspx page, it then opens up the 'save dialog box', and saves the
csv files without any problem.

I think this is a setting on the browser, where it prompts to save the aspx
page, any ideas on how to change this?

Thanks,
Marise



 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmVpbA==?=
Guest
Posts: n/a
 
      09-24-2004
I believe this should work

Response.AddHeader("Content-Disposition", filename.csv);
Response.ContentType = "text/csv";


"M. D'Costa" wrote:

> Hello,
>
> I am saving a csv file through an ASP.NET web application. The data is
> obtained from a database and
> saved to the local users machine.
>
> I am using the Response objects methods of Addheader and ContentType. It
> works fine on my machine to save the file, however on another machine
> browser(Internet Explorer), it prompts to save the aspx page. When I say to
> save the aspx page, it then opens up the 'save dialog box', and saves the
> csv files without any problem.
>
> I think this is a setting on the browser, where it prompts to save the aspx
> page, any ideas on how to change this?
>
> Thanks,
> Marise
>
>
>
>

 
Reply With Quote
 
 
 
 
Girish Bharadwaj
Guest
Posts: n/a
 
      09-24-2004
Wouldn't it still prompt you though?

--
Girish Bharadwaj
http://msmvps.com/gbvb
"Neil" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I believe this should work
>
> Response.AddHeader("Content-Disposition", filename.csv);
> Response.ContentType = "text/csv";
>
>
> "M. D'Costa" wrote:
>
> > Hello,
> >
> > I am saving a csv file through an ASP.NET web application. The data is
> > obtained from a database and
> > saved to the local users machine.
> >
> > I am using the Response objects methods of Addheader and ContentType. It
> > works fine on my machine to save the file, however on another machine
> > browser(Internet Explorer), it prompts to save the aspx page. When I say

to
> > save the aspx page, it then opens up the 'save dialog box', and saves

the
> > csv files without any problem.
> >
> > I think this is a setting on the browser, where it prompts to save the

aspx
> > page, any ideas on how to change this?
> >
> > Thanks,
> > Marise
> >
> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
read CSV file using csv library Li Chen Ruby 18 03-23-2010 12:44 AM
read and write csv file using csv module jliu66 Python 0 10-19-2007 03:12 PM
How to move data from a CSV file to a JTable, and from a JTable to a CSV file ? Tintin92 Java 1 02-14-2007 06:51 PM
Issue saving csv file from asp page M. D'Costa ASP .Net 2 09-28-2004 07:51 AM
Problem saving a csv file through ASP.NET application M. D'Costa ASP .Net 1 09-23-2004 02:10 PM



Advertisments