Xml.DocumentSource Property

Gets or sets the path to an XML document to display in the Xml control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
property String^ DocumentSource {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_DocumentSource ()

/** @property */
public void set_DocumentSource (String value)

public function get DocumentSource () : String

public function set DocumentSource (value : String)

Not applicable.

Property Value

The path to an XML document to display in the Xml control.

The XML document to display in the Xml control is specified in one of three ways. You can specify a System.Xml.XmlDocument object, an XML string, or an XML file by setting the appropriate property. The DocumentSource property is used to specify the path to an XML file (representing an XML document) to display in the control. You can use a relative or an absolute path. A relative path relates the location of the file to the location of the Web Forms page or user control, without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the path to the file in code. An absolute path provides the complete path, so moving the site to another directory requires updating the code.

TopicLocation
How to: Load XML Data in the XML Web Server ControlBuilding ASP .NET Web Applications
How to: Load XML Data in the XML Web Server ControlBuilding ASP .NET Web Applications
How to: Add XML Web Server Controls to a Web Forms Page (Visual Studio)Building ASP .NET Web Applications in Visual Studio

The following code example shows how to display an XML document using an XSL Transform in the Xml control.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: