Path Property
Collapse the table of content
Expand the table of content

IHierarchyData.Path Property

Gets the hierarchical path of the node.

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

string Path { get; }

Property Value

Type: System.String
A String that identifies the hierarchical path relative to the current node.

The Path property can be passed to the GetHierarchicalView method to retrieve the HierarchicalDataSourceView object that corresponds to the node identified by Path.

Caution noteCaution

The Path property should not contain any sensitive information about the host environment, because it might be rendered to the client in a data-bound control.

The following code example demonstrates how to implement the Path property in a class that implements the IHierarchyData interface. The FileSystemHierarchyData class wraps a FileSystemInfo object, and the Path property implementation returns its file system path. This code example is part of a larger example provided for the IHierarchyData interface and the HierarchicalDataSourceControl class.

// DirectoryInfo returns the OriginalPath, while FileInfo returns
// a fully qualified path.
public string Path
        return fileSystemObject.ToString();

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

© 2016 Microsoft