System.Web.UI.WebControls Namespace MenuItem Class
.NET Framework version 2.0
Returns the level at which a MenuItem object is displayed.
Script |
[ Integer variable = ] MenuItem.Depth |
This property can only be used programmatically; it cannot be set when declaring the control.
variable |
The level at which a menu item is displayed. |
The property is read only with no default value.
Use the Depth property to determine the level at which a MenuItem is displayed in a Menu control.
The depth represents the number of hierarchy levels between the current menu item and the root menu item. For example, a root menu item has a depth of 0. A submenu item of a root menu item has a depth of 1, and so on.
MenuItem Members