I found "a" solution. By chaning the content type to "application/pdf"
and the file extension to ".csv"
I was able to force the content delivery of the file be seperated from the postback content. This works across browsers though does have an unfortunate effect in FireFox which asks the user to open the text file using Adobe Reader (the registered application for "application/pdf" content). This doesn't matter for our customer but may not be an option for others.
This does tie the cause down quite firmly in the MIME configuration in IIS though I'm still left puzzled as to the exact setting causing it. I had tried explicitly setting up ".txt"
as text/plain
and ".csv"
as text/csv
(a valid but usually unregistered MIME type) and neither worked. I wonder if there's some kind of MIME type heirarchy/preference at play here.
Still, at least there's a viable solution. I hope this helps others.