HtmlString Class

Syntax

public class HtmlString

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Rendering.HtmlString

Constructors

HtmlString(Microsoft.AspNet.Mvc.Rendering.StringCollectionTextWriter)

Initializes a new instance of [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) that is backed by <paramref name=”writer” />.

Arguments:
public HtmlString(StringCollectionTextWriter writer)
HtmlString(System.String)
Arguments:
  • input (System.String) –
public HtmlString(string input)

Properties

Empty()
Return type:Microsoft.AspNet.Mvc.Rendering.HtmlString
public static HtmlString Empty { get; }

Methods

Microsoft.AspNet.Mvc.Rendering.HtmlString.ToString()
Return type:System.String
public override string ToString()
WriteTo(System.IO.TextWriter)

Writes the value in this instance of [Microsoft.AspNet.Mvc.Rendering.HtmlString](Microsoft.AspNet.Mvc.Rendering.HtmlString.yml) to the target <paramref name=”targetWriter” />.

Arguments:
  • targetWriter (System.IO.TextWriter) – The [System.IO.TextWriter]() to write contents to.
public void WriteTo(TextWriter targetWriter)