ValidationSummaryTagHelper Class

Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper implementation targeting any HTML element with an <code>asp-validation-summary</code> attribute.

Namespace
Microsoft.AspNetCore.Mvc.TagHelpers
Assemblies
  • Microsoft.AspNetCore.Mvc.TagHelpers

Syntax

[HtmlTargetElement("div", Attributes = "asp-validation-summary")]
public class ValidationSummaryTagHelper : TagHelper, ITagHelper
class Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper

Constructors

ValidationSummaryTagHelper(Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator)

Creates a new Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper.

Arguments:generator (Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator) – The Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator.
public ValidationSummaryTagHelper(IHtmlGenerator generator)

Properties

Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper.Generator
Return type:Microsoft.AspNetCore.Mvc.ViewFeatures.IHtmlGenerator
[HtmlAttributeNotBound]
protected IHtmlGenerator Generator { get; }
Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper.Order
Return type:System.Int32
public override int Order { get; }
Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper.ValidationSummary

If Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary.All or Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary.ModelOnly, appends a validation summary. Otherwise ( Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary.None, the default), this tag helper does nothing.

Return type:Microsoft.AspNetCore.Mvc.Rendering.ValidationSummary
[HtmlAttributeName("asp-validation-summary")]
public ValidationSummary ValidationSummary { get; set; }
Microsoft.AspNetCore.Mvc.TagHelpers.ValidationSummaryTagHelper.ViewContext
Return type:Microsoft.AspNetCore.Mvc.Rendering.ViewContext
[HtmlAttributeNotBound]
public ViewContext ViewContext { get; set; }

Methods

Process(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput)
public override void Process(TagHelperContext context, TagHelperOutput output)