ValidationSummaryTagHelper Class

Summary

@!:ITagHelper- implementation targeting any HTML element with an <c>asp-validation-summary</c> attribute.

Syntax

public class ValidationSummaryTagHelper : TagHelper

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.TagHelpers.ValidationSummaryTagHelper

Constructors

ValidationSummaryTagHelper(Microsoft.AspNet.Mvc.Rendering.IHtmlGenerator)

Creates a new [Microsoft.AspNet.Mvc.TagHelpers.ValidationSummaryTagHelper](Microsoft.AspNet.Mvc.TagHelpers.ValidationSummaryTagHelper.yml).

Arguments:
public ValidationSummaryTagHelper(IHtmlGenerator generator)

Properties

Generator()
Return type:Microsoft.AspNet.Mvc.Rendering.IHtmlGenerator
protected IHtmlGenerator Generator { get; }
ValidationSummary()

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

Return type:Microsoft.AspNet.Mvc.ValidationSummary
public ValidationSummary ValidationSummary { get; set; }
ViewContext()
Return type:Microsoft.AspNet.Mvc.ViewContext
public ViewContext ViewContext { get; set; }

Methods

Process(TagHelperContext, TagHelperOutput)
Arguments:
  • context (TagHelperContext) –
  • output (TagHelperOutput) –
public override void Process(TagHelperContext context, TagHelperOutput output)