Saves the XML data currently held in memory by the System.Web.UI.WebControls.XmlDataSource control to disk if the XmlDataSource.DataFile property is set.
While the System.Web.UI.WebControls.XmlDataSource control is typically used in read-only data-binding scenarios, you can use the System.Web.UI.WebControls.XmlDataSource control to edit XML data in the underlying XML data file. In these scenarios, XML data is loaded from an XML file by the System.Web.UI.WebControls.XmlDataSource control. You modify the System.Xml.XmlDataDocument in memory using the XmlDataSource.GetXmlDocument method, and then save to the XML data file by calling the XmlDataSource.Save method. This editable XML scenario is possible when the following conditions are met:
The XML data is loaded from an XML file indicated by the XmlDataSource.DataFile property, not from inline XML data specified in the XmlDataSource.Data property.
No XSLT transformation is specified in the XmlDataSource.Transform or XmlDataSource.TransformFile properties.
The XmlDataSource.Save method does not handle concurrent save operations by different requests. If more than one user is editing an XML file through the System.Web.UI.WebControls.XmlDataSource control, there is no guarantee that all users are operating with the same data. It is also possible for a XmlDataSource.Save operation to fail due to these same concurrency issues.