How to Use ASP.NET Core TagHelpers (original) (raw)
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
All articles
Topics
Latest Stories
in Your Inbox
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required
By submitting this form, I understand and acknowledge my data will be processed in accordance with Progress' Privacy Policy.
I agree to receive email communications from Progress Software or its Partners, containing information about Progress Software’s products. I understand I may opt out from marketing communication at any time here or through the opt out option placed in the e-mail communication received.
By submitting this form, you understand and agree that your personal data will be processed by Progress Software or its Partners as described in our Privacy Policy. You may opt out from marketing communication at any time here or through the opt out option placed in the e-mail communication sent by us or our Partners.
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.