Export (0) Print
Expand All
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

Menu.RenderingMode Property

Gets or sets a value that specifies whether the Menu control renders HTML table elements and inline styles, or listitem elements and cascading style sheet (CSS) styles.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
public MenuRenderingMode RenderingMode { get; set; }
<asp:Menu RenderingMode="MenuRenderingMode" />

Property Value

Type: System.Web.UI.WebControls.MenuRenderingMode
A value that specifies whether the Menu control renders HTML table elements and inline styles, or listitem elements and cascading style sheet (CSS) styles. The default value is Default.

The value of the RenderingMode property determines how the menu control renders markup for the Menu control.

In ASP.NET 3.5 and earlier versions, the Menu control uses HTML table elements and inline styles to specify the appearance of the menu in a browser. In ASP.NET 4 and later versions, by default the Menu control uses HTML listitem elements and cascading style sheet (CSS) styles.

If you do not set this property, the Menu control renders markup that is appropriate to the ASP.NET version that is indicated by the Control.RenderingCompatibility property. The Menu control uses the following rules:

This property is provided for backward compatibility. If the RenderingCompatibility property indicates that you want controls to generate HTML that is compatible with ASP.NET 4 or later, but you want the Menu control to be an exception that uses earlier behavior, you can set this property to Table. For example, if you have a Web page that displays text from right to left you might want to set this property to Table because some browsers do not display the List mode markup properly for right-to-left text.

.NET Framework

Supported in: 4.5.1, 4.5, 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.