Creating Zip file from stream and downloading it

前端 未结 8 1115
深忆病人
深忆病人 2020-12-02 22:20

I have a DataTable that i want to convert it to xml and then zip it, using DotNetZip. finally user can download it via Asp.Net webpage. My code in below

            


        
8条回答
  •  鱼传尺愫
    2020-12-02 23:06

    Have you tried to flush the stream before zipping?

    dt.WriteXml(stream);
    stream.Flush();
    ZipFile zipFile = new ZipFile();
    

提交回复
热议问题