Author: lszk | Posted on: 1/27/2010 4:46:16 PM | Views : 231

Hi.
In my app I want to download an xml file generated on the server when I press the button. I have a code
XDocument doc = report.GetReport(); Response.ContentType = "text/xml"; Response.AppendHeader("Content-Disposition", String.Format("attachment; filename=Report-{0}.xml", DateTime.Now)); using (System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(Response.Output)) { doc.Save(writer); } Response.End();
But it doesn't work. I want a Save As dialog to see, but now I only see the xml structure in the Firebug in the response.

...

Go to the complete details ...