StringHtmlContent Class

String content which gets encoded when written.

Namespace
Microsoft.AspNetCore.Mvc.ViewFeatures
Assemblies
  • Microsoft.AspNetCore.Mvc.ViewFeatures

Syntax

[DebuggerDisplay("{DebuggerToString()}")]
public class StringHtmlContent : IHtmlContent
class Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent

Constructors

StringHtmlContent(System.String)

Creates a new instance of Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent

Arguments:input (System.String) – System.String to be HTML encoded when Microsoft.AspNetCore.Mvc.ViewFeatures.StringHtmlContent.WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder) is called.
public StringHtmlContent(string input)

Methods

WriteTo(System.IO.TextWriter, System.Text.Encodings.Web.HtmlEncoder)
public void WriteTo(TextWriter writer, HtmlEncoder encoder)