Creating Zip file from stream and downloading it

前端 未结 8 1107
深忆病人
深忆病人 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:10

    Add a ContentType header:

    Response.ContentType = "application/zip";
    

    this will allow the browsers to detect what you are sending.

提交回复
热议问题