I generate a xml dynamically (serializing my custom type XMLDocType) in an ASP.NET MVC3 through the code below:
XMLDocType XMLdoc = new XMLDocType();
… generating contente for XMLdoc …
XmlSerializer xml = new XmlSerializer(typeof(XMLDocType));
TextWriter writer = new StreamWriter("xmloutput.xml");
xml.Serialize(writer, XMLdoc);
writer.Close();
How can I dowload the xml content into the local computer (instead of server) through the normal downloading process in browsers (ie, opening a Save As dialog)?
Thank you.