title: Thread was being aborted Error ? In asp.net?
body: <p>In web application, i am using code, to download the documnet which is uploaded, which is written in item command event of datalist, but it s giving error like "Thread was being aborted" can you help me to solve this, thank you. My code is as fallows.</p>
  
  <pre><code>protected void dtlstMagazine_ItemCommand(object source, DataListCommandEventArgs e)
  {
     try 
     { 
      objItMagBe.TitleId = Convert.ToInt32(e.CommandArgument);
      dts = new DataSet();
      dts = objItMagBL.GetMagzineByTitleID(objItMagBe);
      GetPopularMagazine();
  
      string Myfile = "../xxxx/DataFiles/" + dts.Tables[0].Rows[0]["Files"].ToString();
      if (File.Exists(Server.MapPath(Myfile)) == true)
      {
          Response.AppendHeader("Content-Disposition", "attachment; filename=" + Myfile);
          Response.TransmitFile(Server.MapPath(Myfile));
          Response.End();
          Response.Flush();
      }
     }
     catch
     {
  
      }
  }
  </code></pre>