title: Error: Excepiton in System.Threading.ThreadAbortException: Thread was being aborted
body: <p>While downloading template i m getting following error message.</p>
  
  <p>I have tried instead of  Response.Flush(); with Response.End();. But getting same error. </p>
  
  <pre><code>Error: Excepiton in Download:System.Threading.ThreadAbortException: Thread was being aborted.
  at System.Threading.Thread.AbortInternal()
  at System.Threading.Thread.Abort(Object stateInfo)
  at System.Web.HttpResponse.End()
  </code></pre>
  
  <p>Any idea to avoid above exception</p>
  
  <p>Code </p>
  
  <pre><code>private void DownloadFile(string filePath, string downloadFileName)
  {
      Response.ContentType = "application/ms-excel";
      Response.AddHeader("content-disposition", "attachment; filename=" + downloadFileName);
      Response.TransmitFile(filePath);
      // Response.Flush();
      Response.End();
  }
  </code></pre>
  
  <p>Thanks in advance..</p>