title: Using Response.TransmitFile to download file but also contains the page source
body: <p>Below is the offending code, I download a csv however it appends the page source to the bottom any ideas on how to prevent this?</p>
  
  <pre><code>            var priceList = Test();
              const string downloadName = "PriceList.csv";
              var fs = new FileStream(downloadName, FileMode.Create);
  
              var csv = new CsvHelper.CsvHelper(fs);
              csv.Writer.WriteRecords(priceList);
              Response.ClearContent();
  
              //not sure what the correct content type is. This is probally wrong
              Response.ContentType = "application/xls";
              //Setting size is optional               
              Response.AddHeader("Content-Disposition",
                 "attachment; filename=" + downloadName + "; size=" + fs.Length.ToString());
              var fn = fs.Name;
              fs.Close();
              loadingImage.Visible = false;
              Response.TransmitFile(fn);
              Response.Flush();
  </code></pre>