Skip to content

Instantly share code, notes, and snippets.

Last active Jan 31, 2017
What would you like to do?
Custom tag helpers being used in an ASP.NET Core MVC Razor view
@using static TagHelpersDemo.TagHelpers.CardTagHelper
ViewData["Title"] = "Home Page";
<div class="clearfix">&nbsp;</div>
<hand player="John">
<card suit="@CardSuit.Heart" rank="@CardRank.Ace"></card>
<card suit="@CardSuit.Club" rank="@CardRank.Eight"></card>
<card suit="@CardSuit.Diamond" rank="@CardRank.Jack"></card>
<hand player="Jane">
<card suit="@CardSuit.Spade" rank="@CardRank.Four"></card>
<card suit="@CardSuit.Heart" rank="@CardRank.Queen"></card>
<card suit="@CardSuit.Heart" rank="@CardRank.Seven"></card>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment