How do I create an XML file with ASP.NET and have it prompt to download?
<p>I'm currently trying to write data (client machine) into a xml file where the user can save. However, I want the users to be able to decide on where they want to save this written xml file. Is there any controls or codes that I can use to allow the users to save the file?.</p>

<p>Update:</p>

<p>is that right way to do? </p>

<pre><code>**HttpContext.Current.Response.Write(xw.ToStroing()); &lt;&lt;&lt; ??????**
HttpContext.Current.Response.End(); 
</code></pre>

<p>update: </p>

<pre><code>XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            MemoryStream ms = new MemoryStream();

HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.ContentType = "text/xml";
            HttpContext.Current.Response.AddHeader("Content-Disposition:", "attachment;filename=" + HttpUtility.UrlEncode(fileName));        

            using (StringWriter sw = new StringWriter())
            {
                using (XmlWriter xw = XmlWriter.Create(ms, settings))

                {
                    xw.WriteStartDocument();

                    xw.WriteStartElement("Name");
                    xw.WriteStartElement("Application");
                     ................
                    ......................
                    HttpContext.Current.Response.Write(xw.ToStroing());
                      HttpContext.Current.Response.End(); 
</code></pre>
