TagHelperOutput TagHelperOutput TagHelperOutput TagHelperOutput Class

Definition

Class used to represent the output of an ITagHelper.

public ref class TagHelperOutput : Microsoft::AspNetCore::Html::IHtmlContentContainer
public class TagHelperOutput : Microsoft.AspNetCore.Html.IHtmlContentContainer
type TagHelperOutput = class
    interface IHtmlContent
    interface IHtmlContentContainer
Public Class TagHelperOutput
Implements IHtmlContentContainer
Inheritance
TagHelperOutputTagHelperOutputTagHelperOutputTagHelperOutput
Implements

Constructors

TagHelperOutput(String, TagHelperAttributeList, Func<Boolean,HtmlEncoder,Task<TagHelperContent>>) TagHelperOutput(String, TagHelperAttributeList, Func<Boolean,HtmlEncoder,Task<TagHelperContent>>) TagHelperOutput(String, TagHelperAttributeList, Func<Boolean,HtmlEncoder,Task<TagHelperContent>>) TagHelperOutput(String, TagHelperAttributeList, Func<Boolean,HtmlEncoder,Task<TagHelperContent>>)

Instantiates a new instance of TagHelperOutput.

Properties

Attributes Attributes Attributes Attributes

The HTML element's attributes.

Content Content Content Content

Get or set the HTML element's main content.

IsContentModified IsContentModified IsContentModified IsContentModified

true if Content has been set, false otherwise.

PostContent PostContent PostContent PostContent

The HTML element's post content.

PostElement PostElement PostElement PostElement

Content that follows the HTML element.

PreContent PreContent PreContent PreContent

The HTML element's pre content.

PreElement PreElement PreElement PreElement

Content that precedes the HTML element.

TagMode TagMode TagMode TagMode

Syntax of the element in the generated HTML.

TagName TagName TagName TagName

The HTML element's tag name.

Methods

GetChildContentAsync() GetChildContentAsync() GetChildContentAsync() GetChildContentAsync()

Executes children asynchronously and returns their rendered content.

GetChildContentAsync(Boolean) GetChildContentAsync(Boolean) GetChildContentAsync(Boolean) GetChildContentAsync(Boolean)

Executes children asynchronously and returns their rendered content.

GetChildContentAsync(HtmlEncoder) GetChildContentAsync(HtmlEncoder) GetChildContentAsync(HtmlEncoder) GetChildContentAsync(HtmlEncoder)

Executes children asynchronously with the given encoder in scope and returns their rendered content.

GetChildContentAsync(Boolean, HtmlEncoder) GetChildContentAsync(Boolean, HtmlEncoder) GetChildContentAsync(Boolean, HtmlEncoder) GetChildContentAsync(Boolean, HtmlEncoder)

Executes children asynchronously with the given encoder in scope and returns their rendered content.

Reinitialize(String, TagMode) Reinitialize(String, TagMode) Reinitialize(String, TagMode) Reinitialize(String, TagMode)

Clears the TagHelperOutput and updates its state with the provided values.

SuppressOutput() SuppressOutput() SuppressOutput() SuppressOutput()

Changes TagHelperOutput to generate nothing.

WriteTo(TextWriter, HtmlEncoder) WriteTo(TextWriter, HtmlEncoder) WriteTo(TextWriter, HtmlEncoder) WriteTo(TextWriter, HtmlEncoder)

Explicit Interface Implementations

IHtmlContentContainer.CopyTo(IHtmlContentBuilder) IHtmlContentContainer.CopyTo(IHtmlContentBuilder) IHtmlContentContainer.CopyTo(IHtmlContentBuilder) IHtmlContentContainer.CopyTo(IHtmlContentBuilder)
IHtmlContentContainer.MoveTo(IHtmlContentBuilder) IHtmlContentContainer.MoveTo(IHtmlContentBuilder) IHtmlContentContainer.MoveTo(IHtmlContentBuilder) IHtmlContentContainer.MoveTo(IHtmlContentBuilder)

Extension Methods

AddClass(TagHelperOutput, String, HtmlEncoder) AddClass(TagHelperOutput, String, HtmlEncoder) AddClass(TagHelperOutput, String, HtmlEncoder) AddClass(TagHelperOutput, String, HtmlEncoder)

Adds the given classValue to the tagHelperOutput's Attributes.

CopyHtmlAttribute(TagHelperOutput, String, TagHelperContext) CopyHtmlAttribute(TagHelperOutput, String, TagHelperContext) CopyHtmlAttribute(TagHelperOutput, String, TagHelperContext) CopyHtmlAttribute(TagHelperOutput, String, TagHelperContext)

Copies a user-provided attribute from context's AllAttributes to tagHelperOutput's Attributes.

MergeAttributes(TagHelperOutput, TagBuilder) MergeAttributes(TagHelperOutput, TagBuilder) MergeAttributes(TagHelperOutput, TagBuilder) MergeAttributes(TagHelperOutput, TagBuilder)

Merges the given tagBuilder's Attributes into the tagHelperOutput.

RemoveClass(TagHelperOutput, String, HtmlEncoder) RemoveClass(TagHelperOutput, String, HtmlEncoder) RemoveClass(TagHelperOutput, String, HtmlEncoder) RemoveClass(TagHelperOutput, String, HtmlEncoder)

Removes the given classValue from the tagHelperOutput's Attributes.

RemoveRange(TagHelperOutput, IEnumerable<TagHelperAttribute>) RemoveRange(TagHelperOutput, IEnumerable<TagHelperAttribute>) RemoveRange(TagHelperOutput, IEnumerable<TagHelperAttribute>) RemoveRange(TagHelperOutput, IEnumerable<TagHelperAttribute>)

Removes the given attributes from tagHelperOutput's Attributes.

Applies to