asp.net.ph

MenuItem.ValuePath Property

System.Web.UI.WebControls Namespace   MenuItem Class


.NET Framework version 2.0

Returns the path from the root menu item to the current MenuItem.

Syntax


Script MenuItem.ValuePath = strValuePath

This property can only be used programmatically; it cannot be set when declaring the control.

Property ValuePath


strValuePath A delimiter-separated list of menu item values that form a path from the root menu item to the current MenuItem.

The property is read/write with no default value.

Remarks

Use the ValuePath property to determine the path to the Value associated with the current MenuItem.

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.

The delimiter character used to separate the menu item values can be specified using the PathSeparator property.

The ValuePath is commonly used when parsing the list for the individual values, or to pass as an argument to the FindItem method of the Menu 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.

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

Example

The following example shows how the ValuePath property can be used to determine the list of menu item values that form a path from the root menu item to the current MenuItem.

 Show me 

See Also

MenuItem Members   Value Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph