title: Aw Snap Error: Chrome crashing on exporting to csv using c#
body: <p>I am trying to export a datatable to csv using c# code, in my asp.net website. The browser crashes after loading for sometime. It works fine in my local machine. However, when I deploy it on a server and try exporting, I get the "aw snap" error. Can someone please help?</p>
  
  <p>Here is my C# code:</p>
  
  <pre><code>string csvfileName = FieldName + "_" + @"AnalysisReport_" + Session["TableName"].ToString() + ".csv";
  
              string fileName = Server.MapPath("~/Downloads/" + csvfileName);
              using (StreamWriter writer = new StreamWriter(@fileName))
              {
                  Common.ToCSV("*mydatatable*", writer, true);
              }
  
              Response.Clear();
              Response.ContentType = "application/csv";
              Response.AddHeader("Content-Disposition", "attachment; filename=" + csvfileName);
              Response.WriteFile(fileName);
              Response.Flush();
              File.Delete(@fileName);
              Response.End();
  </code></pre>
  
  <p>The button to export to excel is placed inside an update panel. Could this be the cause of the problem?</p>