aspnet-devexpress-dot-web-dot-menuitem-b960c479.md
Gets or sets the unique identifier name for the current menu item.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue("")]
public string Name { get; set; }
<DefaultValue("")>
Public Property Name As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A string value that specifies the item’s unique identifier name.
|
The Name property specifies the unique identifier name for the current menu item. This property can be used at runtime to obtain a particular item specified by its unique identifier name (via the MenuItemCollection.FindByName method) rather than by its index and display text.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
DevExpress.Web.MenuItem newItemCopy = new DevExpress.Web.MenuItem();
newItemCopy.Name = "CopyAppointment";
newItemCopy.Text = "Copy";
asp-net-web-forms-create-responsive-web-app/CS/ResponsiveWebApplication/Root.master.cs#L77
protected void RightAreaMenu_ItemClick(object source, DevExpress.Web.MenuItemEventArgs e) {
if(e.Item.Name == "SignOutItem") {
AuthHelper.SignOut(); // DXCOMMENT: Your Signing out logic
Dim newItemCopy As DevExpress.Web.MenuItem = New DevExpress.Web.MenuItem()
newItemCopy.Name = "CopyAppointment"
newItemCopy.Text = "Copy"
See Also
js-ASPxClientMenuBase.GetItemByName