System.Web.UI.WebControls Namespace Menu Class
.NET Framework version 2.0
Sets or retrieves the number of menu levels to render for a dynamic menu.
Inline |
<asp:menu maximumdynamicdisplaylevels = intValue ... > |
Script |
Menu.MaximumDynamicDisplayLevels [ = intValue ] |
intValue |
The number of menu levels to render for a dynamic menu./td> |
The property is read/write with a default value of 3.
Use the MaximumDynamicDisplayLevels property to specify or determine the number of menu levels to render for a dynamic menu.
By default, menu items with a level higher than the value specified by the StaticDisplayLevels property are displayed in a dynamic menu.
To control dynamic display behavior, use this property to specify how many additional menu levels should dynamically appear after the static display level. For example, if the menu has a static level of 3 and a max dynamic level of 2, the first three levels of the menu would be statically displayed, while the next two levels would show dynamically.
Setting this property to 0 displays a flat menu up to the level specified by the StaticDisplayLevels property, without any dynamic menus.
On the other hand, menu items with a level higher than the value specified by the MaximumDynamicDisplayLevels property will not be displayed.
The following example demonstrates how to use the MaximumDynamicDisplayLevels property to limit the number of menu levels to display in a dynamic menu.
<asp:menu id = "navigationMenu"
staticdisplaylevels=2
staticsubmenuindent=10
orientation = "Vertical"
maximumdynamicdisplaylevels=3
target = "_blank"
runat = "server">
<items>
...
</items>
</asp:menu>
Menu Members StaticDisplayLevels