System.Web.UI.WebControls.XmlDataSource.GetHierarchicalView Method

Gets the data source view object for the System.Web.UI.WebControls.XmlDataSource control. The viewPath parameter can be an XPath expression.

Syntax

protected override System.Web.UI.HierarchicalDataSourceView GetHierarchicalView (string viewPath)

Parameters

viewPath
An XPath expression that identifies a node from which the current hierarchical view is built.

Returns

Returns an System.Web.UI.WebControls.XmlHierarchicalDataSourceView object that represents a single view of the data starting with the data node identified by viewPath.

Remarks

You can call the XmlDataSource.GetHierarchicalView(string) method to retrieve a System.Web.UI.WebControls.XmlHierarchicalDataSourceView object associated with the System.Web.UI.WebControls.XmlDataSource control. If you specify viewPath value, the System.Web.UI.WebControls.XmlDataSource control returns a data source view object that represents the view on the node identified by viewPath, along with all its child nodes. If you set viewPath to string.Empty, the System.Web.UI.WebControls.XmlDataSource control checks the XmlDataSource.XPath property to determine the root node from which to build the data source view. If the XmlDataSource.XPath property is set, the System.Web.UI.WebControls.XmlDataSource control uses it to return a data source view in the same way the viewPath expression is used. If the XmlDataSource.XPath property is not set, the System.Web.UI.WebControls.XmlDataSource control returns a view of all the data nodes in the XML data.

Requirements

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