Export (0) Print
Expand All

MenuItem::ValuePath Property

Gets the path from the root menu item to the current menu item.

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

[BrowsableAttribute(false)]
public:
property String^ ValuePath {
	String^ get ();
}

Property Value

Type: System::String
A delimiter-separated list of menu item values that form a path from the root menu item to the current menu item.

The ValuePath property contains a delimiter-separated list of menu item values that form a path from the root menu item to the current menu item. The value path is used to indicate the position of a menu item in a Menu control. You can specify the delimiter character used to separate the menu item values by using the PathSeparator property. This value is commonly used when parsing the list for the individual values, or to pass as an argument to the FindItem method of the TreeView class. Depending on the value 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 value should not contain any commas; otherwise, you cannot accurately parse the ValuePath property.

NoteNote

The values of the Value property of each menu item from the root menu item to the current menu item are used to generate the value path. Menu items at the same menu level must each have a unique value for the Value property; the Menu control cannot distinguish between different menu items at the same level that have the same value.

The following example demonstrates how to parse the value to the ValuePath property for the individual menu item values.

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

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft