SelectListItem Class

Syntax

public class SelectListItem

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Rendering.SelectListItem

Properties

Disabled()

Gets or sets a value that indicates whether this [Microsoft.AspNet.Mvc.Rendering.SelectListItem](Microsoft.AspNet.Mvc.Rendering.SelectListItem.yml) is disabled.

Return type:System.Boolean
public bool Disabled { get; set; }
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.

Return type:Microsoft.AspNet.Mvc.Rendering.SelectListGroup
public SelectListGroup Group { get; set; }
Selected()
Return type:System.Boolean
public bool Selected { get; set; }
Text()
Return type:System.String
public string Text { get; set; }
Value()
Return type:System.String
public string Value { get; set; }