© Adam Freeman 2017

Adam Freeman, Pro ASP.NET Core MVC 2, https://doi.org/10.1007/978-1-4842-3150-0_23

23. Understanding Tag Helpers

Adam Freeman

(1)London, UK

Tag helpers are a new feature that has been introduced in ASP.NET Core MVC and are C# classes that transform HTML elements in a view. Common uses for tag helpers include generating URLs for forms using the application’s routing configuration, ensuring that elements of a specific type are styled consistently, and replacing custom shorthand elements with commonly used fragments of content. In this chapter, I describe how tag helpers work and how custom tag helpers are created and applied. In Chapter 24, I describe the built-in tag helpers that support HTML forms, and in Chapter 25 I describe ...

Get Pro ASP.NET Core MVC 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.