Export (0) Print
Expand All

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 */
String get_Path ()

function get Path () : String

Not applicable.

Property Value

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 {
    get {
        return fileSystemObject.ToString();
    }
}

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

Community Additions

ADD
Show:
© 2014 Microsoft