开发者

Can I zip Response.write?

开发者 https://www.devze.com 2022-12-17 11:16 出处:网络
Let me explain better than what the question state. I dynamically generate a KML file from an aspx page and use routing to change the url so I can access myapp.com/mykml.kml and the download starts. I

Let me explain better than what the question state. I dynamically generate a KML file from an aspx page and use routing to change the url so I can access myapp.com/mykml.kml and the download starts. I use Response.write() in the aspx page to send the data and it work flawlessly. But there is a zipped version for KML fi开发者_运维问答les which is KMZ and I am wondering if I can still use my aspx page to serve a KMZ instead of a KML. Since I do not use a file I cannot "zip" it. Is there a way to zip the stream and output it in the Response.Write()?


Yes, you can: ASP.NET - Create Google Earth .kmz files dynamically using in-memory streams and #ziplib

0

精彩评论

暂无评论...
验证码 换一张
取 消