From 7b525593661854c511c119b5a0a80ecec4b99fe1 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Wed, 17 Dec 2014 16:32:05 -0800 Subject: [PATCH] Modify TagHelpers to use new content mode design. - React to aspnet/Razor#221 - Modified existing TagHelpers to no longer rely on ContentBehavior and to instead utilize GetChildContentAsync, PreContent, Content and PostContent. --- .../Views/Home/Create.cshtml | 4 ++-- src/Microsoft.AspNet.Mvc.Razor/RazorPage.cs | 14 +++++++++++++- .../FormTagHelper.cs | 6 ++---- .../InputTagHelper.cs | 1 - .../LabelTagHelper.cs | 19 ++++++++++++++----- .../OptionTagHelper.cs | 14 +++++++------- .../SelectTagHelper.cs | 3 +-- .../TextAreaTagHelper.cs | 1 - .../ValidationMessageTagHelper.cs | 19 ++++++++++++++----- .../ValidationSummaryTagHelper.cs | 3 +-- .../TagHelpers/HiddenTagHelper.cs | 9 +++++---- .../TagHelpers/RepeatContentTagHelper.cs | 9 ++++----- .../TagHelpers/TitleTagHelper.cs | 3 +-- 13 files changed, 64 insertions(+), 41 deletions(-) diff --git a/samples/TagHelperSample.Web/Views/Home/Create.cshtml b/samples/TagHelperSample.Web/Views/Home/Create.cshtml index e7bee3837f..f1f8e8e08c 100644 --- a/samples/TagHelperSample.Web/Views/Home/Create.cshtml +++ b/samples/TagHelperSample.Web/Views/Home/Create.cshtml @@ -13,7 +13,7 @@
@* validation summary tag helper will target just
elements and append the list of errors *@ - @* - i.e. this helper, like helper appends content. *@ @* helper does nothing if model is valid and (client-side validation is disabled or asp-validation-summary="ValidationSummary.ModelOnly") *@ @* don't need a bound attribute to match Html.ValidationSummary()'s headerTag parameter; users wrap message as they wish *@ @@ -48,7 +48,7 @@