Tag Helpers
Server-side
Trigger code execution
Built-in or custom
Replaces HTML Helpers
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers<a asp-controller="Home" asp-action="Index">Home</a>Custom Tag Helpers
Creating a Tag Helper
public class EmailTagHelper : TagHelper
{
public override void Process(
TagHelperContext context, TagHelperOutput output)
{
....
}
}Using the Tag Helper
<email address="contact@pieshop.com" content="Contact Us">
</email>Registering Custom Tag Helper
@addTagHelper PieShop.TagHelpers.*, PieShopLast updated
Was this helpful?