You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[HtmlTargetElement("button")]
public class ConditionalDisableTagHelper : TagHelper
{
[HtmlAttributeName("asp-is-disabled")]
public bool IsDisabled { set; get; }
public override void Process(TagHelperContext context, TagHelperOutput output)
{
if (IsDisabled)
{
var d = new TagHelperAttribute("disabled", "disabled");
output.Attributes.Add(d);
}
base.Process(context, output);
}
}
In particular, please add
[MeansImplicitUse]
toHtmlTargetElement
andHtmlAttributeName
The text was updated successfully, but these errors were encountered: