Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to send csv file to client through FireFox

Posted on 2007-10-01
2
Medium Priority
?
699 Views
Last Modified: 2011-09-20
I want to send a csv file to a client from my asp .net application.  When I do the following
 Response.AddHeader("Content-Disposition", "mycsvfile.csv");      
Response.Write("[csv file elements]);                              
Response.End();
I get a csv file for IE, however in Firefox it gives me a mycsvfile.csv.txt file.  How do I make it so that it does not interpret the file as a txt file for Firefox?
0
Comment
Question by:kayhustle
  • 2
2 Comments
 
LVL 14

Accepted Solution

by:
NBSO_ISS earned 2000 total points
ID: 19991843
Set your contenttype to something that the browser won't recognize ...

Response.ContentType = "text/x-csv"

this should leave the .csv extension.
0
 
LVL 14

Expert Comment

by:NBSO_ISS
ID: 19991880
It also wouldn't hurt to do a

Response.Flush

Before

Response.End

In order to flush the memory.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question