This documentation is archived and is not being maintained.

TreeView::PathSeparator Property

Gets or sets the character that is used to delimit the node values that are specified by the ValuePath property.

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

public:
property wchar_t PathSeparator {
	wchar_t get ();
	void set (wchar_t value);
}
<asp:TreeView PathSeparator="Char" />

Property Value

Type: System::Char
The character used to delimit the node values specified in the ValuePath property. The default is a slash mark (/).

The ValuePath property contains a delimiter-separated list of node values that form a path from the root node to the current node. Use the PathSeparator property to specify the delimiter character that is used to separate the node values. This value is commonly used when parsing the list for the individual values.

Depending on the text that is displayed in the TreeView control, the delimiter character might need to be changed to prevent any conflicts. For example, if you set the delimiter character to a comma, the displayed text should not contain any commas; otherwise, the ValuePath property cannot be parsed accurately.

The value of this property is stored in view state.

The following code example demonstrates how to use the PathSeparator property to specify the delimiter character for the ValuePath property of a node. This value is then used to parse the ValuePath property for the individual values.

No code example is currently available or this language may not be supported.

.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.
Show: