System.Web.UI.WebControls Namespace Menu Class
.NET Framework version 2.0
Sets or retrieves the number of menu levels to render for a static menu.
Inline |
<asp:menu staticdisplaylevels = intValue ... > |
Script |
Menu.StaticDisplayLevels [ = intValue ] |
intValue |
The number of menu levels to render for a static menu./td> |
The property is read/write with a default value of 1.
Use the StaticDisplayLevels property to specify or determine the number of menu levels to render for a static menu.
By default, the menu items at the root level ( level 0 ) are displayed in the static menu.
To control static display behavior, use this property to specify how many additional menu levels ( static submenus ) to show from the root of the menu. For example, if StaticDisplayLevels is set to 3, the menu will be expanded to statically display its first three levels.
Menu items with a level higher than the value specified by the StaticDisplayLevels property are displayed in a dynamic menu.
The following example demonstrates how to use the StaticDisplayLevels property to set the number of menu levels to display in a static menu.
<asp:menu id = "navigationMenu"
staticdisplaylevels=2
staticsubmenuindent=10
orientation = "Vertical"
target = "_blank"
runat = "server">
<items>
...
</items>
</asp:menu>
Menu Members MaximumDynamicDisplayLevels