MenuItem.Text Property

Gets or sets the text content of the current menu item.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll


public string Text { get; set; }

Property Value

Type Default Description


A string value that specifies the text content of the MenuItem.


Use the Text property to specify the current menu item’s text content. The position of the text within items is specified by the AppearanceStyleBase.HorizontalAlign and AppearanceStyleBase.VerticalAlign properties available via the corresponding style properties of a menu control or a menu item object.

If the MenuItem.NavigateUrl property of a menu item is assigned, the item serves as a hyperlink and the appearance of the item’s text set by the Text property can be controlled via the ASPxMenuBase.LinkStyle property.

In addition to the text, you can specify a menu item’s image and hint text using the MenuItem.Image and MenuItem.ToolTip properties respectively.


If the Text property is empty and an item image is specified, a text element markup is not rendered. In this case, it is impossible to set a text on the client side using the ASPxClientMenuItem.SetText method.


This sample shows how to bind the ASPxMenu to data stored in a database.

View Example