September 2016
Beginner to intermediate
186 pages
3h 28m
English
To create a Bootstrap Alert Tag Helper, which will be a little bit more advanced than the previous example, follow these steps:
BootstrapAlertTagHelper in the TagHelpers folder.TagHelper.Dismissable and a string property called Color to the class:
public bool Dismissable { get; set; }
public string Color { get; set; }
ProcessAsync method, as illustrated here: public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { output.TagName = "div"; output.Attributes.Add("class","alert alert-" + Color); output.Attributes.Add("role", ...Read now
Unlock full access