Windows Dev Center

The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SelectListItem Class

Represents the selected item in an instance of the SelectList class.


Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public class SelectListItem

The SelectListItem type exposes the following members.

Public methodSelectListItemInitializes a new instance of the SelectListItem class.

Public propertyDisabledGets or sets a value that indicates whether this SelectListItem is disabled.
Public propertyGroupRepresents 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.
Public propertySelectedGets or sets a value that indicates whether this SelectListItem is selected.
Public propertyTextGets or sets the text of the selected item.
Public propertyValueGets or sets the value of the selected item.

Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft