title: Export to .csv File
body: <p>I had problem with export data to .csv file. I use 2 methods.</p>
  
  <pre><code>        Encoding csvEncoding = new UTF8SignatureEncoding();
          byte[] csvFile = TestByte(CsvContentDelimiter.NewLine, CsvContentDelimiter.Semicolon, csvEncoding);
  
  
          string attachment = String.Format("attachment; filename={0}.csv", "docs_inv");
  
          Response.Clear();
          Response.ClearHeaders();
          Response.ClearContent();
          Response.ContentType = "text/csv";
          Response.ContentEncoding = csvEncoding;
          Response.AppendHeader("Content-Disposition", attachment);
          Response.BinaryWrite(csvFile);
          Response.Flush();
          Response.End();
  </code></pre>
  
  <p>And</p>
  
  <pre><code>    public byte[] TestByte(CsvContentDelimiter rowDelimiter, CsvContentDelimiter columnDelimiter, Encoding encoding)
      {
          StringBuilder sb = new StringBuilder();
          sb.Append("product;");
          return encoding.GetBytes(sb.ToString());
      }
  </code></pre>
  
  <p>This code create .csv file, but file have bad Encoding and i see only some "hash"</p>