title: How can I send the client multiple files to download
body: <p>I'm using a handler(.ashx) to serve some files. I have a folder where I store ebooks. I name them by the books PK, and each book may have a few different formats:</p>
  
  <pre><code>211.html
  211.pdf
  211.prc
  </code></pre>
  
  <p>The following test code successfully downloads one book.</p>
  
  <pre><code>context.Response.ContentType = "application/octet-stream";
  context.Response.AppendHeader("Content-Disposition", "attachment;filename=myfile.pdf");
  context.Response.TransmitFile(context.Server.MapPath("~/Media/eBooks/212.pdf"));
  </code></pre>
  
  <p>How can I serve the client the three different formats? (The clients existing organization isn't in a folder)</p>
  
  <p>I was trying to do something like this:</p>
  
  <pre><code>DirectoryInfo bookDir  = new DirectoryInfo(context.Server.MapPath("~/Media/eBooks"));
  FileInfo[] f  = bookDir.GetFiles();
  
  foreach (var n in f)
  {
      context.Response.AppendHeader("Content-Disposition", "attachment;filename=myfile.pdf");
      context.Response.TransmitFile(context.Server.MapPath("~/Media/eBooks/212.pdf"));
  }
  </code></pre>
  
  <p>But it downloads one file with no file extension.</p>