I need to create an ActionResult in an ASP.NET MVC application which has a .csv filetype.
I will provide a \'do not call\' email list to my marketing partners and i
This is how I'm doing something similar. I'm treating it as a download:
var disposition = String.Format(
"attachment;filename=\"{0}.csv\"", this.Model.Name);
Response.AddHeader("content-disposition", disposition);
This should show up in the browser as a file download with the given filename.
I can't think of a reason why yours wouldn't work, though.