IHtmlContent Interface

HTML content which can be written to a TextWriter.

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

Syntax

public interface IHtmlContent
interface Microsoft.AspNetCore.Html.IHtmlContent

Methods

WriteTo(System.IO.TextWriter, System.Text.Encodings.Web.HtmlEncoder)

Writes the content by encoding it with the specified <em>encoder</em> to the specified <em>writer</em>.

Arguments:
  • writer (System.IO.TextWriter) – The System.IO.TextWriter to which the content is written.
  • encoder (System.Text.Encodings.Web.HtmlEncoder) – The System.Text.Encodings.Web.HtmlEncoder which encodes the content to be written.
void WriteTo(TextWriter writer, HtmlEncoder encoder)