7 instantiations of SelectListItem
Microsoft.AspNetCore.Mvc.ViewFeatures (7)
DefaultDisplayTemplates.cs (3)
66new SelectListItem(Resources.Common_TriState_NotSet, string.Empty, !value.HasValue), 67new SelectListItem(Resources.Common_TriState_True, "true", (value == true)), 68new SelectListItem(Resources.Common_TriState_False, "false", (value == false)),
DefaultHtmlGenerator.cs (1)
1581new SelectListItem()
HtmlHelper.cs (1)
1385var selectListItem = new SelectListItem
Rendering\MultiSelectList.cs (2)
164var newListItem = new SelectListItem 189var newListItem = new SelectListItem
152 references to SelectListItem
Microsoft.AspNetCore.Mvc.TagHelpers (3)
SelectTagHelper.cs (3)
57/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 61public IEnumerable<SelectListItem> Items { get; set; } 124var items = Items ?? Enumerable.Empty<SelectListItem>();
Microsoft.AspNetCore.Mvc.ViewFeatures (149)
DefaultDisplayTemplates.cs (3)
53foreach (var item in TriStateValues(value)) 62internal static List<SelectListItem> TriStateValues(bool? value) 64return new List<SelectListItem>
DefaultHtmlGenerator.cs (15)
510IEnumerable<SelectListItem> selectList, 534IEnumerable<SelectListItem> selectList, 919if (rawValue is IEnumerable<SelectListItem>) 1036internal static TagBuilder GenerateOption(SelectListItem item, string text) 1041internal static TagBuilder GenerateOption(SelectListItem item, string text, bool selected) 1485private static IEnumerable<SelectListItem> GetSelectListItems( 1500$"IEnumerable<{nameof(SelectListItem)}>", 1505if (!(value is IEnumerable<SelectListItem> selectList)) 1510$"IEnumerable<{nameof(SelectListItem)}>")); 1548public IHtmlContent GenerateGroupsAndOptions(string optionLabel, IEnumerable<SelectListItem> selectList) 1555IEnumerable<SelectListItem> selectList, 1558if (!(selectList is IList<SelectListItem> itemsList)) 1598var item = itemsList[i]; 1617var groupItem = itemsList[j]; 1640private static IHtmlContent GenerateOption(SelectListItem item, ICollection<string> currentValues)
HtmlHelper.cs (10)
337IEnumerable<SelectListItem> selectList, 366public IEnumerable<SelectListItem> GetEnumSelectList<TEnum>() where TEnum : struct 383public IEnumerable<SelectListItem> GetEnumSelectList(Type enumType) 429public IHtmlContent ListBox(string expression, IEnumerable<SelectListItem> selectList, object htmlAttributes) 819IEnumerable<SelectListItem> selectList, 1085/// <param name="selectList">An enumeration of <see cref="SelectListItem"/>.</param> 1094IEnumerable<SelectListItem> selectList, 1368protected virtual IEnumerable<SelectListItem> GetEnumSelectList(ModelMetadata metadata) 1381var selectList = new List<SelectListItem>(); 1385var selectListItem = new SelectListItem
HtmlHelperOfT.cs (2)
108IEnumerable<SelectListItem> selectList, 226IEnumerable<SelectListItem> selectList,
IHtmlGenerator.cs (7)
368/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 396IEnumerable<SelectListItem> selectList, 411/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 417/// <c>null</c>, selects &lt;option&gt; elements based on <see cref="SelectListItem.Selected"/> values in 445IEnumerable<SelectListItem> selectList, 455/// A collection of <see cref="SelectListItem"/> objects used to generate &lt;optgroup&gt; and &lt;option&gt; 461IHtmlContent GenerateGroupsAndOptions(string optionLabel, IEnumerable<SelectListItem> selectList);
Rendering\HtmlHelperSelectExtensions.cs (49)
17/// "selected" attribute to an &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 18/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 34/// <see cref="SelectListItem"/> objects. 48/// <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or <see cref="SelectListItem.Text"/> matches the 68/// <see cref="SelectListItem"/> objects. 88/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 89/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 99/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 101/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 112IEnumerable<SelectListItem> selectList) 122/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 123/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 133/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 135/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 150IEnumerable<SelectListItem> selectList, 161/// "selected" attribute to an &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 162/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 172/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 174/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 188IEnumerable<SelectListItem> selectList, 199/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 200/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 208/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 210/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 223IEnumerable<SelectListItem> selectList) 234/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 235/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 243/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 245/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 262IEnumerable<SelectListItem> selectList, 278/// "selected" attribute to an &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 279/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 287/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 289/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 305IEnumerable<SelectListItem> selectList, 317/// "selected" attribute to an &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 318/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 334/// <see cref="SelectListItem"/> objects. 347/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 348/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 358/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 360/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 371IEnumerable<SelectListItem> selectList) 381/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 382/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 390/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 392/// entry with full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 405IEnumerable<SelectListItem> selectList)
Rendering\IHtmlHelper.cs (14)
254/// "selected" attribute to an &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 255/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 263/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 265/// full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 282IEnumerable<SelectListItem> selectList, 376/// with a decimal representation of the ordinal as <see cref="SelectListItem.Value"/> 377/// and the display name as <see cref="SelectListItem.Text"/>. 383IEnumerable<SelectListItem> GetEnumSelectList<TEnum>() where TEnum : struct; 397IEnumerable<SelectListItem> GetEnumSelectList(Type enumType); 445/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 446/// <see cref="SelectListItem.Text"/> matches an entry in the first non-<c>null</c> collection found in: 454/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 455/// &lt;optgroup&gt; and &lt;option&gt; elements. If <c>null</c>, finds the <see cref="SelectListItem"/> 468IHtmlContent ListBox(string expression, IEnumerable<SelectListItem> selectList, object htmlAttributes);
Rendering\IHtmlHelperOfT.cs (10)
116/// "selected" attribute to an &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 117/// <see cref="SelectListItem.Text"/> matches the first non-<c>null</c> value found in: 124/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 126/// full name and that entry must be a collection of <see cref="SelectListItem"/> objects. 144IEnumerable<SelectListItem> selectList, 238/// &lt;option&gt; if its <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or 239/// <see cref="SelectListItem.Text"/> matches an entry in the first non-<c>null</c> collection found in: 246/// A collection of <see cref="SelectListItem"/> objects used to populate the &lt;select&gt; element with 247/// &lt;optgroup&gt; and &lt;option&gt; elements. If <c>null</c>, finds the <see cref="SelectListItem"/> 263IEnumerable<SelectListItem> selectList,
Rendering\MultiSelectList.cs (16)
14/// of <see cref="SelectListItem"/> objects. 16public class MultiSelectList : IEnumerable<SelectListItem> 19private IList<SelectListItem> _selectListItems; 75/// <param name="items">The items used to build each <see cref="SelectListItem"/> of the list.</param> 77/// <see cref="SelectListItem"/>.</param> 79/// <see cref="SelectListItem"/>.</param> 81/// corresponding <see cref="SelectListItem"/>.</param> 83/// <see cref="SelectListItem"/>.</param> 131public virtual IEnumerator<SelectListItem> GetEnumerator() 141private IList<SelectListItem> GetListItems() 148private IList<SelectListItem> GetListItemsWithValueField() 160var listItems = new List<SelectListItem>(); 164var newListItem = new SelectListItem 178private IList<SelectListItem> GetListItemsWithoutValueField() 186var listItems = new List<SelectListItem>(); 189var newListItem = new SelectListItem
Rendering\SelectList.cs (6)
11/// of <see cref="SelectListItem"/> objects. 71/// <param name="items">The items used to build each <see cref="SelectListItem"/> of the list.</param> 73/// <see cref="SelectListItem"/>.</param> 75/// <see cref="SelectListItem"/>.</param> 77/// <see cref="SelectListItem"/>.</param> 79/// <see cref="SelectListItem"/>.</param>
Rendering\SelectListItem.cs (17)
14/// Initializes a new instance of <see cref="SelectListItem"/>. 19/// Initializes a new instance of <see cref="SelectListItem"/>. 21/// <param name="text">The display text of this <see cref="SelectListItem"/>.</param> 22/// <param name="value">The value of this <see cref="SelectListItem"/>.</param> 31/// Initializes a new instance of <see cref="SelectListItem"/>. 33/// <param name="text">The display text of this <see cref="SelectListItem"/>.</param> 34/// <param name="value">The value of this <see cref="SelectListItem"/>.</param> 35/// <param name="selected">Value that indicates whether this <see cref="SelectListItem"/> is selected.</param> 43/// Initializes a new instance of <see cref="SelectListItem"/>. 45/// <param name="text">The display text of this <see cref="SelectListItem"/>.</param> 46/// <param name="value">The value of this <see cref="SelectListItem"/>.</param> 47/// <param name="selected">Value that indicates whether this <see cref="SelectListItem"/> is selected.</param> 48/// <param name="disabled">Value that indicates whether this <see cref="SelectListItem"/> is disabled.</param> 56/// Gets or sets a value that indicates whether this <see cref="SelectListItem"/> is disabled. 70/// Gets or sets a value that indicates whether this <see cref="SelectListItem"/> is selected. 77/// Gets or sets a value that indicates the display text of this <see cref="SelectListItem"/>. 83/// Gets or sets a value that indicates the value of this <see cref="SelectListItem"/>.