53 writes to Text
IdentitySample.Mvc (1)
Controllers\AccountController.cs (1)
355
var factorOptions = userFactors.Select(purpose => new SelectListItem {
Text
= purpose, Value = purpose }).ToList();
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
DefaultHtmlGenerator.cs (1)
1583
Text
= optionLabel,
HtmlHelper.cs (1)
1387
Text
= keyValuePair.Key.Name,
Rendering\MultiSelectList.cs (2)
168
Text
= Eval(item, DataTextField),
192
Text
= Eval(item, DataTextField),
Rendering\SelectListItem.cs (1)
26
Text
= text;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (47)
Rendering\HtmlHelperSelectTest.cs (47)
64
new SelectListItem {
Text
= SelectSources.ModelStateEntry.ToString() },
65
new SelectListItem {
Text
= SelectSources.ModelStateEntryWithPrefix.ToString() },
66
new SelectListItem {
Text
= SelectSources.ViewDataEntry.ToString() },
67
new SelectListItem {
Text
= SelectSources.PropertyOfViewDataEntry.ToString() },
68
new SelectListItem {
Text
= SelectSources.ViewDataEntryWithPrefix.ToString() },
69
new SelectListItem {
Text
= SelectSources.PropertyOfViewDataEntryWithPrefix.ToString() },
70
new SelectListItem {
Text
= SelectSources.ModelValue.ToString() },
71
new SelectListItem {
Text
= SelectSources.PropertyOfModel.ToString() },
1414
new SelectListItem {
Text
= "cero", Value = "0" },
1415
new SelectListItem {
Text
= nameof(EnumWithDisplayNames.One), Value = "1" },
1416
new SelectListItem {
Text
= "dos", Value = "2" },
1417
new SelectListItem {
Text
= "tres", Value = "3" },
1418
new SelectListItem {
Text
= "name from resources", Value = "-2" },
1419
new SelectListItem {
Text
= "menos uno", Value = "-1" },
1426
new SelectListItem {
Text
= "cero", Value = "0" },
1427
new SelectListItem {
Text
= nameof(EnumWithDisplayNames.One), Value = "1" },
1428
new SelectListItem {
Text
= "dos", Value = "2" },
1429
new SelectListItem {
Text
= "tres", Value = "3" },
1430
new SelectListItem {
Text
= "name from resources", Value = "-2" },
1431
new SelectListItem {
Text
= "menos uno", Value = "-1" },
1438
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Zero), Value = "0" },
1439
new SelectListItem {
Text
= nameof(EnumWithDuplicates.None), Value = "0" },
1440
new SelectListItem {
Text
= nameof(EnumWithDuplicates.One), Value = "1" },
1441
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Duece), Value = "2" },
1442
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Two), Value = "2" },
1443
new SelectListItem {
Text
= nameof(EnumWithDuplicates.MoreThanTwo), Value = "3" },
1444
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Three), Value = "3" },
1451
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Zero), Value = "0" },
1452
new SelectListItem {
Text
= nameof(EnumWithDuplicates.None), Value = "0" },
1453
new SelectListItem {
Text
= nameof(EnumWithDuplicates.One), Value = "1" },
1454
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Duece), Value = "2" },
1455
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Two), Value = "2" },
1456
new SelectListItem {
Text
= nameof(EnumWithDuplicates.MoreThanTwo), Value = "3" },
1457
new SelectListItem {
Text
= nameof(EnumWithDuplicates.Three), Value = "3" },
1464
new SelectListItem {
Text
= nameof(EnumWithFields.Zero), Value = "0" },
1465
new SelectListItem {
Text
= nameof(EnumWithFields.One), Value = "1" },
1466
new SelectListItem {
Text
= nameof(EnumWithFields.Two), Value = "2" },
1467
new SelectListItem {
Text
= nameof(EnumWithFields.Three), Value = "3" },
1468
new SelectListItem {
Text
= nameof(EnumWithFields.MinusTwo), Value = "-2" },
1469
new SelectListItem {
Text
= nameof(EnumWithFields.MinusOne), Value = "-1" },
1476
new SelectListItem {
Text
= nameof(EnumWithFields.Zero), Value = "0" },
1477
new SelectListItem {
Text
= nameof(EnumWithFields.One), Value = "1" },
1478
new SelectListItem {
Text
= nameof(EnumWithFields.Two), Value = "2" },
1479
new SelectListItem {
Text
= nameof(EnumWithFields.Three), Value = "3" },
1480
new SelectListItem {
Text
= nameof(EnumWithFields.MinusTwo), Value = "-2" },
1481
new SelectListItem {
Text
= nameof(EnumWithFields.MinusOne), Value = "-1" },
1605
Text
= item.Text,
37 references to Text
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
SelectTagHelperTest.cs (4)
323
var savedText = items.Select(item => item.
Text
).ToList();
352
Assert.Equal(savedText, items.Select(item => item.
Text
));
504
var savedText = items.Select(item => item.
Text
).ToList();
532
Assert.Equal(savedText, items.Select(item => item.
Text
));
Microsoft.AspNetCore.Mvc.ViewFeatures (19)
DefaultDisplayTemplates.cs (1)
55
selectTag.InnerHtml.AppendHtml(DefaultHtmlGenerator.GenerateOption(item, item.
Text
));
DefaultHtmlGenerator.cs (2)
1645
var value = item.Value ?? item.
Text
;
1649
var tagBuilder = GenerateOption(item, item.
Text
, selected);
Rendering\HtmlHelperSelectExtensions.cs (11)
18
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
48
/// <see cref="SelectListItem.Value"/> (if non-<c>null</c>) or <see cref="SelectListItem.
Text
"/> matches the
89
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
123
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
162
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
200
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
235
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
279
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
318
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
348
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
382
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
Rendering\IHtmlHelper.cs (3)
255
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
377
/// and the display name as <see cref="SelectListItem.
Text
"/>.
446
/// <see cref="SelectListItem.
Text
"/> matches an entry in the first non-<c>null</c> collection found in:
Rendering\IHtmlHelperOfT.cs (2)
117
/// <see cref="SelectListItem.
Text
"/> matches the first non-<c>null</c> value found in:
239
/// <see cref="SelectListItem.
Text
"/> matches an entry in the first non-<c>null</c> collection found in:
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (14)
Rendering\HtmlHelperSelectTest.cs (14)
330
var savedText = selectList.Select(item => item.
Text
).ToList();
341
Assert.Equal(savedText, selectList.Select(item => item.
Text
));
751
var savedText = selectList.Select(item => item.
Text
).ToList();
762
Assert.Equal(savedText, selectList.Select(item => item.
Text
));
1093
var savedText = selectList.Select(item => item.
Text
).ToList();
1108
Assert.Equal(savedText, selectList.Select(item => item.
Text
));
1190
var savedText = selectList.Select(item => item.
Text
).ToList();
1201
Assert.Equal(savedText, selectList.Select(item => item.
Text
));
1321
Assert.Equal("cero en-US", zeroSelect.
Text
);
1503
expected.OrderBy(item => item.
Text
, StringComparer.Ordinal),
1504
result.OrderBy(item => item.
Text
, StringComparer.Ordinal));
1565
Assert.Equal(expectedItem.
Text
, actualItem.
Text
);
1605
Text = item.
Text
,