TagHelperContent Class

Definition

Abstract class used to buffer content returned by ITagHelpers.

public ref class TagHelperContent abstract : Microsoft::AspNetCore::Html::IHtmlContentBuilder
public abstract class TagHelperContent : Microsoft.AspNetCore.Html.IHtmlContentBuilder
type TagHelperContent = class
    interface IHtmlContentBuilder
    interface IHtmlContentContainer
    interface IHtmlContent
type TagHelperContent = class
    interface IHtmlContent
    interface IHtmlContentBuilder
    interface IHtmlContentContainer
Public MustInherit Class TagHelperContent
Implements IHtmlContentBuilder
Inheritance
TagHelperContent
Derived
Implements

Constructors

TagHelperContent()

Properties

IsEmptyOrWhiteSpace

Gets a value indicating whether the content is empty or whitespace.

IsModified

Gets a value indicating whether the content was modified.

Methods

Append(String)

Appends unencoded to the existing content.

AppendFormat(IFormatProvider, String, Object[])

Appends the specified format to the existing content with information from the provider after replacing each format item with the HTML encoded String representation of the corresponding item in the args array.

AppendFormat(String, Object[])

Appends the specified format to the existing content after replacing each format item with the HTML encoded String representation of the corresponding item in the args array.

AppendHtml(IHtmlContent)

Appends htmlContent to the existing content.

AppendHtml(String)

Appends encoded to the existing content. encoded is assumed to be an HTML encoded String and no further encoding will be performed.

Clear()

Clears the content.

CopyTo(IHtmlContentBuilder)

Copies the contained content of this IHtmlContentContainer into builder.

GetContent()

Gets the content.

GetContent(HtmlEncoder)

Gets the content.

MoveTo(IHtmlContentBuilder)

Moves the contained content of this IHtmlContentContainer into builder.

After MoveTo(IHtmlContentBuilder) is called, this IHtmlContentContainer instance should be left in an empty state.

Reinitialize()

Clears the TagHelperContent, so it can be reused.

SetContent(String)

Sets the content.

SetHtmlContent(IHtmlContent)

Sets the content.

SetHtmlContent(String)

Sets the content.

WriteTo(TextWriter, HtmlEncoder)

Writes the content by encoding it with the specified encoder to the specified writer.

Explicit Interface Implementations

IHtmlContentBuilder.Append(String)

Appends a String value. The value is treated as unencoded as-provided, and will be HTML encoded before writing to output.

IHtmlContentBuilder.AppendHtml(IHtmlContent)

Appends an IHtmlContent instance.

IHtmlContentBuilder.AppendHtml(String)

Appends an HTML encoded String value. The value is treated as HTML encoded as-provided, and no further encoding will be performed.

IHtmlContentBuilder.Clear()

Clears the content.

Extension Methods

AppendFormat(IHtmlContentBuilder, IFormatProvider, String, Object[])

Appends the specified format to the existing content with information from the formatProvider after replacing each format item with the HTML encoded String representation of the corresponding item in the args array.

AppendFormat(IHtmlContentBuilder, String, Object[])

Appends the specified format to the existing content after replacing each format item with the HTML encoded String representation of the corresponding item in the args array.

AppendHtmlLine(IHtmlContentBuilder, String)

Appends an NewLine after appending the String value. The value is treated as HTML encoded as-provided, and no further encoding will be performed.

AppendLine(IHtmlContentBuilder)

Appends an NewLine.

AppendLine(IHtmlContentBuilder, IHtmlContent)

Appends an NewLine after appending the IHtmlContent value.

AppendLine(IHtmlContentBuilder, String)

Appends an NewLine after appending the String value. The value is treated as unencoded as-provided, and will be HTML encoded before writing to output.

SetContent(IHtmlContentBuilder, String)

Sets the content to the String value. The value is treated as unencoded as-provided, and will be HTML encoded before writing to output.

SetHtmlContent(IHtmlContentBuilder, IHtmlContent)

Sets the content to the IHtmlContent value.

SetHtmlContent(IHtmlContentBuilder, String)

Sets the content to the String value. The value is treated as HTML encoded as-provided, and no further encoding will be performed.

Applies to