HtmlContentBuilderExtensions Class

Extension methods for Microsoft.AspNetCore.Html.IHtmlContentBuilder.

Namespace
Microsoft.AspNetCore.Html
Assemblies
  • Microsoft.AspNetCore.Html.Abstractions

Syntax

public class HtmlContentBuilderExtensions
class Microsoft.AspNetCore.Html.HtmlContentBuilderExtensions

Methods

AppendFormat(Microsoft.AspNetCore.Html.IHtmlContentBuilder, System.IFormatProvider, System.String, System.Object[])

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

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

A reference to this instance after the append operation has completed.

public static IHtmlContentBuilder AppendFormat(this IHtmlContentBuilder builder, IFormatProvider formatProvider, string format, params object[] args)
AppendFormat(Microsoft.AspNetCore.Html.IHtmlContentBuilder, System.String, System.Object[])

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

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

A reference to this instance after the append operation has completed.

public static IHtmlContentBuilder AppendFormat(this IHtmlContentBuilder builder, string format, params object[] args)
AppendHtmlLine(Microsoft.AspNetCore.Html.IHtmlContentBuilder, System.String)

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

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

The Microsoft.AspNetCore.Html.IHtmlContentBuilder.

public static IHtmlContentBuilder AppendHtmlLine(this IHtmlContentBuilder builder, string encoded)
AppendLine(Microsoft.AspNetCore.Html.IHtmlContentBuilder)

Appends an System.Environment.NewLine.

Arguments:builder (Microsoft.AspNetCore.Html.IHtmlContentBuilder) – The Microsoft.AspNetCore.Html.IHtmlContentBuilder.
Return type:Microsoft.AspNetCore.Html.IHtmlContentBuilder
Returns:The Microsoft.AspNetCore.Html.IHtmlContentBuilder.
public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder)
AppendLine(Microsoft.AspNetCore.Html.IHtmlContentBuilder, Microsoft.AspNetCore.Html.IHtmlContent)

Appends an System.Environment.NewLine after appending the Microsoft.AspNetCore.Html.IHtmlContent value.

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

The Microsoft.AspNetCore.Html.IHtmlContentBuilder.

public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, IHtmlContent content)
AppendLine(Microsoft.AspNetCore.Html.IHtmlContentBuilder, System.String)

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

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

The Microsoft.AspNetCore.Html.IHtmlContentBuilder.

public static IHtmlContentBuilder AppendLine(this IHtmlContentBuilder builder, string unencoded)
SetContent(Microsoft.AspNetCore.Html.IHtmlContentBuilder, System.String)

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

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

The Microsoft.AspNetCore.Html.IHtmlContentBuilder.

public static IHtmlContentBuilder SetContent(this IHtmlContentBuilder builder, string unencoded)
SetHtmlContent(Microsoft.AspNetCore.Html.IHtmlContentBuilder, Microsoft.AspNetCore.Html.IHtmlContent)

Sets the content to the Microsoft.AspNetCore.Html.IHtmlContent value.

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

The Microsoft.AspNetCore.Html.IHtmlContentBuilder.

public static IHtmlContentBuilder SetHtmlContent(this IHtmlContentBuilder builder, IHtmlContent content)
SetHtmlContent(Microsoft.AspNetCore.Html.IHtmlContentBuilder, System.String)

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

Arguments:
Return type:

Microsoft.AspNetCore.Html.IHtmlContentBuilder

Returns:

The Microsoft.AspNetCore.Html.IHtmlContentBuilder.

public static IHtmlContentBuilder SetHtmlContent(this IHtmlContentBuilder builder, string encoded)