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 model-bound forms and server-rendered HTML in Razor Pages while keeping templates close to ordinary HTML.
How deep it goes
Works through generated form markup and custom TagHelper targeting, attribute binding, and Process(), including conditional output suppression.
Examples
Uses currency-converter forms, a checkout page with generated HTML, and a custom conditional element helper.
What you can do after
Build it from scratch with a custom TagHelper and Process(), or apply built-in form helpers in Razor Pages.

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

Related concepts

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.