Guest User

Untitled

a guest
May 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. this.Response.Clear();
  2. this.Response.ClearContent();
  3. this.Response.ClearHeaders();
  4. Response.ContentType = "text/csv";
  5. Response.AddHeader("content-disposition", "attachment;
  6. filename=" + "Unicode_CSV_Demo.csv");
  7.  
  8. DemoCSVcls DemoCSVcls = new DemoCSVcls();
  9. List<DemoCSVcls> CSVTextList = new List<DemoCSVcls>();
  10. DemoCSVcls.Text1 = "‘tipping off’";
  11. DemoCSVcls.Text2 = "ʼ";
  12. CSVTextList.Add(DemoCSVcls);
  13.  
  14. var engine = new FileHelperEngine<DemoCSVcls>(Encoding.UTF8);
  15. string finalString = engine.WriteString(CSVTextList);
  16. Response.BufferOutput = true;
  17. Response.Write(finalString);
  18. Response.Flush();
  19. Response.End();
Add Comment
Please, Sign In to add comment