asp.net.ph

Menu.StaticDisplayLevels Property

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.

Syntax


Inline <asp:menu staticdisplaylevels = intValue ... >
Script Menu.StaticDisplayLevels [ = intValue ]

Property Value


intValue The number of menu levels to render for a static menu./td>

The property is read/write with a default value of 1.

Exceptions


Exception Type Condition
ArgumentOutOfRangeException The specified value is less than 1.

Remarks

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.

Example

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>
See Also

Menu Members   MaximumDynamicDisplayLevels 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