TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
SURAJ KSHIRSAGAR
NA
44
1.4k
Zip a file from folder using ICON ZIP but empty zip created
Jan 19 2017 1:30 AM
using (Ionic.Zip.ZipFile Zip = new Ionic.Zip.ZipFile())
{
string filename = AttchmentFileName.Substring(0, AttchmentFileName.Length - 4);
string filenameE = AttchmentFileName.Substring(12);
filename = filename.Substring(12);
string zipfile = filename + ".Zip";
var zip = new ZipFile();
zip.Password = "123";
zip.Encryption = EncryptionAlgorithm.WinZipAes256;
string filenameWitoutextension = Path.GetFileNameWithoutExtension(@"C:\Template");
string destdir = @"C:\Template\" + filename + ".zip";
zip.AddEntry(filenameE, "");
zip.AddSelectedFiles(filenameE);
zip.Save(destdir);
System.Web.Mail.MailAttachment attachment = new MailAttachment(filename);
message.Attachments.Add(attachment);
}
Reply
Answers (
1
)
I use mvc application and we use Ado.net Entity data model
Writting text on PDF