After I create the text file using this code.
Using zip = New ZipFile()
For Each row As GridDataItem In RadGridDocs.MasterTableView.Items
Dim clientSelectColumn As CheckBox = DirectCast(row("ClientSelectColumn").Controls(0), CheckBox)
Dim chkBox = clientSelectColumn.Checked
If chkBox = "True" Then
Dim txtDocument As TextBox = row.FindControl("txtDocumentFileName")
Dim fileName As String = txtDocument.Text
Dim txtDocumentPath As TextBox = row.FindControl("txtDocumentPath")
Dim documentPath As String = txtDocumentPath.Text
Dim fullpath As String = Server.MapPath("~") + "\" + documentPath + fileName
fullpath = Replace(fullpath, "/", "\")
fullpath = Replace(fullpath, "\", "\\")
'Code to Zip a Folder.
zip.AddFile(fullpath)
End If
Next
zip.Save(Response.OutputStream)
End Using
I am trying to send this out via a asp.net application using .NET 3.5. I keep getting the error "Cannot open file: it does not appear to be a valid archive."
Are there any ideas?