I am trying to export a list to a CSV file. I got it all working up to the point I want to write to file to the response stream. This doesn\'t do anything.
Here is m
yan.kun was on the right track but this is much much easier.
public FileContentResult DownloadCSV() { string csv = "Charlie, Chaplin, Chuckles"; return File(new System.Text.UTF8Encoding().GetBytes(csv), "text/csv", "Report123.csv"); }