34 references to Attributes
Microsoft.AspNetCore.Mvc.TagHelpers (4)
InputTagHelper.cs (2)
256if (tagBuilder.Attributes.TryGetValue("name", out var fullName) && 336if (!hiddenForCheckboxTag.Attributes.ContainsKey("name") &&
TagHelperOutputExtensions.cs (2)
78/// Merges the given <paramref name="tagBuilder"/>'s <see cref="TagBuilder.Attributes"/> into the 90foreach (var attribute in tagBuilder.Attributes)
Microsoft.AspNetCore.Mvc.ViewFeatures (30)
DefaultDisplayTemplates.cs (4)
35inputTag.Attributes["disabled"] = "disabled"; 36inputTag.Attributes["type"] = "checkbox"; 39inputTag.Attributes["checked"] = "checked"; 51selectTag.Attributes["disabled"] = "disabled";
DefaultHtmlGenerator.cs (6)
390tagBuilder.Attributes.Add("for", idString); 1048tagBuilder.Attributes["value"] = item.Value; 1053tagBuilder.Attributes["selected"] = "selected"; 1058tagBuilder.Attributes["disabled"] = "disabled"; 1173var suppliedTypeString = tagBuilder.Attributes["type"]; 1380tagBuilder.Attributes);
DefaultHtmlGeneratorExtensions.cs (2)
40tagBuilder.Attributes["action"] += "#" + fragment; 71tagBuilder.Attributes["action"] += "#" + fragment;
HtmlHelper.cs (5)
743if (!hiddenForCheckbox.Attributes.ContainsKey("name") && 744checkbox.Attributes.TryGetValue("name", out var name)) 1063if (tagBuilder.Attributes.Count == 0) 1068else if (tagBuilder.Attributes.Count == 1 && 1069tagBuilder.Attributes.TryGetValue("for", out var forAttribute) &&
NameAndIdProvider.cs (3)
75/// nothing if <see cref="TagBuilder.Attributes"/> already contains an "id" attribute or the 106if (!tagBuilder.Attributes.ContainsKey("id")) 114tagBuilder.Attributes["id"] = sanitizedId;
Rendering\TagBuilder.cs (10)
57Attributes.Add(tag); 127if (Attributes.TryGetValue("class", out var currentValue)) 129Attributes["class"] = currentValue + " " + value; 133Attributes["class"] = value; 201/// nothing if <see cref="Attributes"/> already contains an "id" attribute or the <paramref name="name"/> 221if (!Attributes.ContainsKey("id")) 229Attributes["id"] = sanitizedId; 239foreach (var attribute in Attributes) 281if (replaceExisting || !Attributes.ContainsKey(key)) 283Attributes[key] = value;