Partager via


SelectListItem.Selected Property

Gets or sets a value that indicates whether this SelectListItem is selected.

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

Syntax

'Declaration
Public Property Selected As Boolean
    Get
    Set
public bool Selected { get; set; }
public:
property bool Selected {
    bool get ();
    void set (bool value);
}

Property Value

Type: System.Boolean
true if the item is selected; otherwise, false.

See Also

Reference

SelectListItem Class

System.Web.Mvc Namespace