liveBook · Manning

Tag Helpers

Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.

How 2 Manning books explain it

Pro ASP.NET Core 7, Tenth Edition

A tag helper is an ASP.NET Core component implemented as a C# class that transforms HTML-like elements during Razor view or page processing.

How it is used
Transforms Razor view or page elements into HTML that reflects application routing, models, styling, or validation state.
How deep it goes
Works through subclassing, attribute binding, targeting, registration, output manipulation, context data, and model expressions; does not detail ModelExpression introspection.
Examples
Uses styled table rows, product-page links, shorthand table headers, model-property rows, conditional warnings, and RSVP validation.
What you can do after
Build it from scratch as a registered custom TagHelper, or apply built-in helpers to links, forms, assets, and validation displays.

Read how Pro ASP.NET Core 7, Tenth Edition explains Tag Helpers →

ASP.NET Core in Action, 3e

Tag Helpers are ASP.NET Core components that add server-side processing behavior to HTML-like elements in Razor files.

How it is used
Generates server-rendered HTML, especially forms, from Razor templates and model properties while keeping markup editor-friendly.
How deep it goes
Explains built-in form helpers and works through custom targeting, output processing, conditional rendering, and child-content handling.
Examples
Uses currency-converter and checkout forms, a server-information element, and a conditional-rendering attribute.
What you can do after
Build custom Tag Helpers and apply built-in helpers to generate model-based forms.

Read how ASP.NET Core in Action, 3e explains Tag Helpers →

What to know first

Related concepts

Questions about Tag Helpers

What is Tag Helpers?

Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.

Which Manning books explain Tag Helpers?

Pro ASP.NET Core 7, Tenth Edition and ASP.NET Core in Action, 3e.

What should I know before learning Tag Helpers?

Manning books that teach Tag Helpers usually introduce asp-for attribute, attribute, C# and handler first.

What kinds of Tag Helpers are there?

Kinds of Tag Helpers include anchor tag helper, EnvironmentTagHelper, form tag helper and label tag helper.

What is Tag Helpers a kind of?

Tag Helpers is a kind of class. A class is a programming-language construct that defines a type’s structure and behavior and provides a basis for creating or representing objects.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.