System.Web.UI.WebControls.XmlDataSource.TransformFile Property

Specifies the file name of an Extensible Stylesheet Language (XSL) file (.xsl) that defines an XSLT transformation to be performed on the XML data managed by the System.Web.UI.WebControls.XmlDataSource control.


[System.ComponentModel.Editor("System.Web.UI.Design.XslTransformFileEditor, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public virtual string TransformFile { set; get; }


Documentation for this section has not yet been entered.


If both the XmlDataSource.TransformFile and XmlDataSource.Transform properties are set, the XmlDataSource.TransformFile property takes precedence and the data in the XSL style sheet file (.xsl) is used instead of the style sheet elements specified in the XmlDataSource.Transform property. If an XPath expression is set using the XmlDataSource.XPath property, it is applied after the XML data is transformed.

If you change the value of the XmlDataSource.Transform property, the System.Web.UI.IDataSource.DataSourceChanged event is raised. If caching is enabled and you change the value of XmlDataSource.Transform, the cache is invalidated.


The System.Web.UI.WebControls.XmlDataSource class uses the deprecated System.Xml.Xsl.XslTransform class to perform XSL transformations. If you want to use style sheet features that were introduced after the System.Xml.Xsl.XslTransform class was deprecated, apply the transforms manually by using the System.Xml.Xsl.XslCompiledTransform class.


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