title: Response.TransmitFile Not downloading, and throwing no Errors
body: <p>I'm currently using a HttpResponse to download files from my Server. I already have a couple functions being used to download Excel/Word files, but I'm having trouble getting my simple Text file (.txt) to download.</p>
  
  <p>With the text file I'm basically dumping contents of a TextBox into a File, attempting to download the file with the HttpResponse and then delete the Temporary Text File. </p>
  
  <p>Here is an example of my code that works for the Excel/Word documents:</p>
  
  <pre><code>protected void linkInstructions_Click(object sender, EventArgs e)
  {
      String FileName = "BulkAdd_Instructions.doc";
      String FilePath = Server.MapPath("~/TempFiles/BulkAdd_Instructions.doc");
      System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
      response.ClearContent();
      response.Clear();
      response.ContentType = "application/x-unknown";
      response.AddHeader("Content-Disposition", "attachment; filename=" + FileName + ";");
      response.TransmitFile(FilePath);
      response.Flush();
      response.End();  
  }
  </code></pre>
  
  <p>And here is the chunk of code that doesn't work.<br>
  Taking Note that the code runs without throwing any errors. The File is created, and Deleted, but never dumped to the User.</p>
  
  <pre><code>protected void saveLog(object sender, EventArgs e)
  { 
      string date = DateTime.Now.ToString("MM_dd_yyyy_hhmm");     //  Get Date/Time
      string fileName = "BulkLog_"+ date + ".txt";                //  Stitch File Name + Date/Time
      string logText = errorLog.Text;                             //  Get Text from TextBox
      string halfPath = "~/TempFiles/" + fileName;                //  Add File Name to Path
      string mappedPath = Server.MapPath(halfPath);               //  Create Full Path
  
      File.WriteAllText(mappedPath, logText);                     //  Write All Text to File
  
      System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
      response.ClearContent();
      response.Clear();
      response.ContentType = "text/plain";
      response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
      response.TransmitFile(mappedPath);                //  Transmit File
      response.Flush();
  
      System.IO.File.Delete(mappedPath);                //  Delete Temporary Log
      response.End();
  }
  </code></pre>