Tag Helpers
Tag Helpers are ASP.NET Core components that process HTML-like elements during Razor view or page rendering.
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.
Related concepts
- classkind of · A class is a programming-language construct that defines a type’s structure or behavior and provides a basis for creating or representing objects.
- validation summaryincludes · A validation summary is a UI component that displays collected validation error messages for multiple fields or controls in a form.
- @addTagHelper directiveconfigured by · The @addTagHelper directive makes specified Tag Helpers available for processing in Razor views or pages.
- Order propertyconfigured by · An order property specifies the relative sequence, precedence, or position of elements, events, or operations.
- label tag helperincludes · The Label Tag Helper is an ASP.NET Core Tag Helper that generates labeled content and associates it with a model-bound form field.
- EnvironmentTagHelperincludes · EnvironmentTagHelper is an ASP.NET Core Tag Helper that conditionally renders element content according to the current hosting environment.
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.

