First I am attaching a file through file attachment control.
than on button click I am using "Convert.FromBase64String(fileName)" , where fileName is the encoded form of the attached file.
After this I am getting the file name as string and file contents as byte[].
For zip I am adding "Ionic.Utils.Zip" as reference , which is a dotnetzip library.
This are the lines I use to create a zip file:
....
ZipFile zip = new ZipFile();
zip.AddFile(fileName);
zip.Save("C:\\ZipFiles\\Test.zip");
...
I am getting the zip file as "Test.zip" . From here onwards the problem starts. How will I attach "Test.zip" to my infopath form??
plz correct me if my method is wrong and help me in meeting my requirements.
Thanks.
Jaimin