Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Menu::RenderingMode Property

.NET Framework 4.6 and 4.5

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:
property MenuRenderingMode RenderingMode {
	MenuRenderingMode get ();
	void set (MenuRenderingMode value);
}

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.6, 4.5, 4
Show:
© 2015 Microsoft