Link to home
Create AccountLog in
Avatar of kayhustle
kayhustle

asked on

How to send csv file to client through FireFox

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?
ASKER CERTIFIED SOLUTION
Avatar of NBSO_ISS
NBSO_ISS

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of NBSO_ISS
NBSO_ISS

It also wouldn't hurt to do a

Response.Flush

Before

Response.End

In order to flush the memory.