Skip to content

Instantly share code, notes, and snippets.

@scottaddie

scottaddie/Index.cshtml

Last active Jan 31, 2017
Embed
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>
<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>
</hand>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.