Latest web development tutorials

ASP.NET ListItem Enabled property

ListItem control ListItem control

Definition and Usage

Enabled property sets or returns whether or not enabled by default ListItem.

If the property is set to TRUE, the ListItem is enabled by default, otherwise FALSE. The default is TRUE.

grammar

<asp:ListItem Enabled="True|False" runat="server" />


Examples

The following example disables the ListBox control in a ListItem:

<form runat="server">
<asp:ListBox runat="server">
<asp:ListItem Text="Item1" Enabled="False"/>
<asp:ListItem Text="Item2" />
</asp:ListBox>
</form>

The demonstration >>

ListItem control ListItem control