Menu.RenderingMode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public:
property System::Web::UI::WebControls::MenuRenderingMode RenderingMode { System::Web::UI::WebControls::MenuRenderingMode get(); void set(System::Web::UI::WebControls::MenuRenderingMode value); };
public System.Web.UI.WebControls.MenuRenderingMode RenderingMode { get; set; }
member this.RenderingMode : System.Web.UI.WebControls.MenuRenderingMode with get, set
Public Property RenderingMode As MenuRenderingMode
Property Value
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.
Remarks
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:
If the value of the RenderingCompatibility property is
3.5
, the Menu control uses HTMLtable
elements and inline styles.If the value of the RenderingCompatibility property is
4.0
or greater, the Menu control uses HTMLlistitem
elements and CSS styles.
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.