Telerik blogs
How to Use ASP.NET Core TagHelpers_870x220

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 Tag Helpers.

Building Reuseable Components in ASP.NET Core

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.


About the Author

Ed Charbeneau

Ed Charbeneau is a web enthusiast, speaker, writer, design admirer, and Developer Advocate for Telerik. He has designed and developed web based applications for business, manufacturing, systems integration as well as customer facing websites. Ed enjoys geeking out to cool new tech, brainstorming about future technology, and admiring great design. Ed's latest projects can be found on GitHub.

Related Posts

Comments

Comments are disabled in preview mode.