string Filename = "http://localhost/SiteName/FileName.xml"; XmlDocument doc = new XmlDocument(); doc.Load(Filename); string strXML = GetXMLString(doc);//Converts XMLDocument to string Response.Clear(); Response.ClearHeaders(); Response.ClearContent(); Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); Response.ContentType = "application/xml"; //or text/xml Response.AddHeader("content-disposition", String.Format("attachment;filename=" + Filename)); Response.WriteFile(strXML); Response.Flush(); Response.Close(); Response.End();
var save = new SaveFileDialog(); var open = new OpenFileDialog(); var result = open.ShowDialog(); if (result == DialogResult.OK) MessageBox.Show("Filename selected to open is " + open.FileName);
OpenFileDialog
SaveDialog
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)