How do I disable a ListItem?

Have you tried adding disabled="disabled" on the ListItem element?

<asp:DropDownList runat="server" ID="id">
    <asp:ListItem Text="Test" Value="value" disabled="disabled" />
</asp:DropDownList>

Bear in mind that browser compatibility varies: http://www.lattimore.id.au/2005/06/18/disable-options-in-a-select-dropdown-element/


You could try setting the attribute from code behind, that way you can programmatically decide what value to be set.

So in your example you would do something like this:

var listItem = DropDownList.Items.FindByText("Your Item Text");
listItem.Attributes["disabled"]="disabled";