Date:  08/25/2010 06:06:44 PM Msg ID:  004198
From:  FoxWeb Support Thread:  004197
Subject:  Re: Download data to a CSV file
The correct mime type for CSV is "text/csv". You could use "application/unknown" if you want to force the file to be downloaded, but for this you will also need to set the Content-Disposition header appropriately:
Response.AddHeader("Content-Disposition", "attachment; filename=TheFileName.csv")
Note that different browsers may react differently to HTTP headers received by the server.
If you have the script accessible externally, you could post (or email) the URL, so that we can inspect the headers.
FoxWeb Support Team email
Sent by Jeff Grippe on 08/25/2010 08:56:30 AM:
I am trying to code a script for downloading data to a CSV file.
I followed your example and included the line
ContentType = "application/unknown"
but the CSV content is being returned to the browser instead of to a file.
The identical code works fine for Excel files but CSV data is being returned to the browser.
What do I need to do differently for CSV?