Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.Response.Clear();
- this.Response.ClearContent();
- this.Response.ClearHeaders();
- Response.ContentType = "text/csv";
- Response.AddHeader("content-disposition", "attachment;
- filename=" + "Unicode_CSV_Demo.csv");
- DemoCSVcls DemoCSVcls = new DemoCSVcls();
- List<DemoCSVcls> CSVTextList = new List<DemoCSVcls>();
- DemoCSVcls.Text1 = "‘tipping off’";
- DemoCSVcls.Text2 = "ʼ";
- CSVTextList.Add(DemoCSVcls);
- var engine = new FileHelperEngine<DemoCSVcls>(Encoding.UTF8);
- string finalString = engine.WriteString(CSVTextList);
- Response.BufferOutput = true;
- Response.Write(finalString);
- Response.Flush();
- Response.End();
Add Comment
Please, Sign In to add comment