Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Gadget to create a CSV file



Would anyone have a controller example that prompts for a file download from a string? I'm trying function that returns a System.Web.Mvc.FileContentResult, but the contents get displayed in the gadget instead of getting downloaded.

Here is the return line of the function:

                return File(new System.Text.UTF8Encoding().GetBytes(sb.ToString()), "text/plain",
                     String.Format("{0}_{1}.{2}", StoreExportBase.GetExportFriendlyName(t), DateTime.Now.ToString("dd_mm_yyy_hh-ss_tt"), extension)



May 29, 2014 21:10
May 30, 2014 9:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.