HOW TO: Create KML or KMZ Files Dynamically in ASP.NET
Solution
ASP.NET - Create Google Earth .kmz files dynamically using in-memory streams and #ziplib
by Shan Plourde - shows how to use the
#ziplib
library and the .NET XmlTextWriter class to produce KMZ files (compressed KML files).
Using XmlTextWriter to generate Google Earth KML from ASPX page
by Tim Hibbard - contains VB.NET example.
How to dynamically serve a KML file in Asp.net 2.0
by Chris O'Sullivan - contains C# example.
Related Resources
Earthware Blog: Writing KML & KMZ files to the browser with ASP.Net
- highlights some caveats when writing KML and KMZ files to IE.
Wikipedia: Keyhole Markup Language (KML)
Google Code: KML Tutorial