How to send csv file to client through FireFox

Posted on 2007-10-01
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]);                              
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?
Question by:kayhustle
    LVL 14

    Accepted Solution

    Set your contenttype to something that the browser won't recognize ...

    Response.ContentType = "text/x-csv"

    this should leave the .csv extension.
    LVL 14

    Expert Comment

    It also wouldn't hurt to do a




    In order to flush the memory.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    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…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now