System.Web.UI.WebControls.XmlDataSource.Save Method

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.

Syntax

public void Save ()

Remarks

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 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.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0