This documentation is archived and is not being maintained.

Xml::TransformSource Property

Gets or sets the path to an Extensible Stylesheet Language Transformation (XSLT) style sheet that formats the XML document before it is written to the output stream.

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

public:
property String^ TransformSource {
	String^ get ();
	void set (String^ value);
}
<asp:Xml TransformSource="String" />

Property Value

Type: System::String
The path to an XSL Transformation style sheet that formats the XML document before it is written to the output stream.

When using the Xml control to display an XML document, you can optionally specify an XSL Transformation style sheet that formats the XML document before it is written to the output stream in one of two ways. You can either format the XML document with a System.Xml.Xsl::XslTransform object or with an XSL Transformation style sheet file. If no XSL Transformation style sheet is specified, the XML document is displayed using the default format. The TransformSource property is used to specify the path to an XSL Transformation style sheet file (representing an XSL Transformation style sheet) used to format the XML document before it is written to the output stream. 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.

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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: