Why does this write “w,w,w” to the response instead of opening a save file dialog?
[HttpPost]
public ActionResult Export(int id)
{
var contentType = "text/csv";
var content = "w,w,w";
var bytes = Encoding.UTF8.GetBytes(content);
var result = new FileContentResult(bytes, contentType)
{
FileDownloadName = "www.csv"
};
return result;
}
Sorry I can’t put this in the question as a comment, How are you making the call to the controller?