This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@addTagHelper *, TagHelperSuite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form asp-page-handler="Post"> | |
<link-button>Test Link</link-button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<asp:LinkButton ID="lbtnSubmit" runat="server" PostBackUrl="~/About.aspx" Text="Submit Form" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post"> | |
<button asp-page="/Index" asp-page-handler="Post">Submit Form</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IndexModel : PageModel | |
{ | |
public void OnGet() | |
{ | |
} | |
public void OnPost() | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fetch the context, so that we can add the Card object to the Cards collection | |
var handContext = (HandContext)context.Items[typeof(HandTagHelper)]; | |
handContext.Cards.Add(new Card { Rank = rank, Suit = suit }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HandContext | |
{ | |
public List<Card> Cards { get; set; } = new List<Card>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model TagHelpersDemo.Views.Shared.Partials.CardViewModel | |
<img src="images/@(Model.PlayerName).png" alt="avatar" class="center-block" /> | |
<div class="text-center"> | |
<h2 class="@Model.SuitColorClass"> | |
<strong>@Html.Raw(Model.SuitCharacterCode)</strong> | |
</h2> | |
<p>@Model.Rank</p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var content = await _html.PartialAsync("~/Views/Shared/Partials/_Card.cshtml", model); | |
output.Content.SetHtmlContent(content); |
NewerOlder