SelectListItem SelectListItem SelectListItem Class

Definition

Represents an item in a SelectList or MultiSelectList. This class is typically rendered as an HTML

<option>
element with the specified attribute values.

public class SelectListItem
type SelectListItem = class
Public Class SelectListItem
Inheritance
SelectListItemSelectListItemSelectListItem

Constructors

SelectListItem() SelectListItem() SelectListItem()

Initializes a new instance of SelectListItem.

SelectListItem(String, String) SelectListItem(String, String) SelectListItem(String, String)

Initializes a new instance of SelectListItem.

SelectListItem(String, String, Boolean) SelectListItem(String, String, Boolean) SelectListItem(String, String, Boolean)

Initializes a new instance of SelectListItem.

SelectListItem(String, String, Boolean, Boolean) SelectListItem(String, String, Boolean, Boolean) SelectListItem(String, String, Boolean, Boolean)

Initializes a new instance of SelectListItem.

Properties

Disabled Disabled Disabled

Gets or sets a value that indicates whether this SelectListItem is disabled. This property is typically rendered as a

disabled="disabled"
attribute in the HTML

<option>
element.
Group Group Group

Represents the optgroup HTML element this item is wrapped into. In a select list, multiple groups with the same name are supported. They are compared with reference equality.

Selected Selected Selected

Gets or sets a value that indicates whether this SelectListItem is selected. This property is typically rendered as a

selected="selected"
attribute in the HTML

<option>
element.
Text Text Text

Gets or sets a value that indicates the display text of this SelectListItem. This property is typically rendered as the inner HTML in the HTML

<option>
element.

Value Value Value

Gets or sets a value that indicates the value of this SelectListItem. This property is typically rendered as a

value="..."
attribute in the HTML

<option>
element.

Applies to