ASP.NET Core has gained a helpful new feature in TagHelpers. Stay up to date with the latest info and learn how you can use them in your apps.
Recently Microsoft announced the release of ASP.NET Core 2.0. With this release comes a new feature for building HTML views called TagHelpers. With ASP.NET Core 2.0 TagHelpers allow developers to write component based views for server side rendering by utilizing a syntax similar to HTML. This new syntax incorporates concepts used in HTML, elements and attributes.
When using TagHelpers in a .cshtml view, Visual Studio treats the TagHelper as it would HTML but with added server side functionality. Often with HTML Helpers the CSS class attribute was difficult to add, and completely lacked Intellisense. With TagHelpers, developers get rich Intellisense for not only server side code but also with any HTML attributes supported by Visual Studio.
In addition to better Intellisense, TagHelpers also make great container elements. TagHelpers treat their inner HTML content as normal HTML elements do. In comparison to HTML Helpers, nested content required escape codes, or specialized using blocks to contain inner HTML content.
Throughout .NET’s journey from conceptualizing ASP.NET Core TagHelpers to our recent release, Progress has continued to support the community by sharing information about TagHelpers. Below are resources that will help keep you up to speed on the latest developments with ASP.NET Core TagHelpers.
Telerik UI for ASP.NET Core supports a variety of TagHelpers with more on their way. Watch our video tutorial on getting started with Telerik Tag Helpers and try them for yourself with a thirty-day free trial of UI for ASP.NET Core.
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required