title: Download selected pdf files from a datatable
body: <p>my controller looks like</p>
  <pre><code>[HttpPost]
      public FileResult methodname(string files)
      {
          String CurrentDate = DateTime.Now.Date.ToString(&quot;dd-MM-yyyy&quot;);
          string dir = filepath + &quot;/&quot; + CurrentDate + &quot;/&quot;;
          string[] fileList = files.Split(&quot;,&quot;);
          var count = fileList.Length;
          try
          {
              _log.LogInformation(&quot;Enter Action with user name &quot; + HttpContext.Session.GetString(&quot;UserName&quot;));
              using (var memoryStream = new MemoryStream())
              {
                  using (var ziparchive = new ZipArchive(memoryStream, ZipArchiveMode.Create, true))
                  {
                      for (int i = 0; i &lt; count; i++)
                      {
                          ziparchive.CreateEntryFromFile(dir + fileList[i], fileList[i]);
                      }
                  }
                  return File(memoryStream.ToArray(), &quot;application/zip&quot;, &quot;Attachments.zip&quot;);
  
              }
          }
          catch (Exception ex)
          {
              _log.LogError(ex.StackTrace);
              return null;
          }
  
      }
  </code></pre>