System.Web.UI.WebControls.MenuItem.Selectable Property

Gets or sets a value that indicates whether the System.Web.UI.WebControls.MenuItem object can be selected, or is "clickable."

Syntax

[System.ComponentModel.DefaultValue(true)]
[System.ComponentModel.Browsable(true)]
public bool Selectable { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When this property is set to false on a menu item, no action occurs when the menu item is clicked (selected). The pop-out image indicating child menu items for the menu item, if one exists, is still shown and available.

If you do not want any child menu items to appear for a menu item, set the MenuItem.Enabled property to false.

MenuItem.Selectable applies only to menu items that can be selected, in the sense that clicking a menu item posts back and sets that item in the selected state. Note that a menu item that cannot be selected is still formatted as a link. This is for accessibility reasons, so that the menu item can cause an action to occur. Also, a menu item, even if it cannot be selected, may have child menu items that can be selected or that need to be displayed.

If you want to prevent a user from clicking a menu item, do one of the following:

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0