[
  {
    "Id": "453166",
    "ThreadId": "215375",
    "Html": "I've been trying to specify specific files to zip directly in my code, as opposed to having to select from a list. Basically the end goal is that users will click on an item to download, the script then needs to take the appropriate file and zip that file and a copy of PDF file and provide that to the user.  So to begin I wanted to see if I can specify a specific file in the code, but I'm getting the following error:\r\n\r\nSystem.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Collections.Generic.IEnumerable`1[System.String]'.\r\n\r\nI feel really dumb with this one as I know its going to be something simple. Here's my code:\r\n\r\n[CODE]\r\nImports System.Text\r\nImports System.IO\r\nImports Ionic.Zip\r\n\r\nPartial Class b2_ShanesTest\r\n    Inherits System.Web.UI.Page\r\n    Public Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)\r\n        Response.Clear()\r\n        Response.BufferOutput = False\r\n\r\n        Dim archiveName As String = String.Format(&quot;archive-{0}.zip&quot;, DateTime.Now.ToString(&quot;yyyy-MMM-dd-HHmmss&quot;))\r\n        Response.ContentType = &quot;application/zip&quot;\r\n        Response.AddHeader(&quot;content-disposition&quot;, &quot;filename=&quot; + archiveName)\r\n        Dim fileName As String = &quot;d:\\inetpub\\wwwroot\\cadownloadcentre\\b2\\CAlogo\\CA_Brand_Guide.pdf&quot;\r\n\r\n        Using zip As New ZipFile()\r\n            zip.AddFiles(fileName)\r\n            zip.Save(Response.OutputStream)\r\n        End Using\r\n        Response.Close()\r\n\r\n    End Sub\r\nEnd Class\r\n[/CODE]",
    "PostedDate": "2010-06-08T12:45:17.473-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "454036",
    "ThreadId": "215375",
    "Html": "Never mind, I figured out my issue. After taking a few days to think about this and clear my head, I finally read the help file and found the answer. \r\n\r\nShane",
    "PostedDate": "2010-06-10T08:34:05.463-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]