Menu.PathSeparator Property

Gets or sets the character used to delimit the path of a menu item in a Menu control.

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);
}
/** @property */
public char get_PathSeparator ()

/** @property */
public void set_PathSeparator (char value)

public function get PathSeparator () : char

public function set PathSeparator (value : char)

Not applicable.

Property Value

The character used to delimit the path of a menu item. The default value is a slash mark (/).

Each menu item (represented by a MenuItem object) in the Menu control has a ValuePath property that specifies the position of the menu item. The value path is a string of delimited values that form the path from a root menu item to the current menu item. Use the PathSeparator property to specify the delimiting character used to separate the values in the menu path. This value is commonly used when parsing the list for the individual values.

Depending on the text displayed in the Menu 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 following code example demonstrates how to use the PathSeparator property to change the delimiter character for a menu item's value path to a comma.

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

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: