Recently i faced this issue too, finally got the solution
To make It work correctly in firefox, make sure in file name Quotes are placed correctly and with no Spaces in file name
so here is the sample example to do basic test
This will work:
Response.ClearContent();
Response.ContentType = "text/csv";
Response.AddHeader("Content-Disposition", "attachment;filename="+ "MyOrders"+ "_Date_"
+DateTime.Now.ToString("d")+".csv");
This also will work:
string myfilename = "MyOrders" + "_Date_" + DateTime.Now.ToString("d") + ".csv";
Response.AppendHeader("Content-Disposition", string.Format("attachment;filename={0}",
myfilename));
//here you can check using the break point,weather you are using any extra quotes in filename
This will not work in firefox
Response.AddHeader("Content-Disposition", "attachment;filename="+ "MyOrders"+ "_Date_"
+DateTime.Now+".csv");
// because in DateTime.Now there is spaces in Time, Seconds , so firefox downloads file not
//as csv but downloads it as File , may be a binary file or unknown file type
References used this , this, this and this
Thanks to all whose post's helped somehow.
Hope it may help someone.