Class MvcHtmlString
Represents an HTML-encoded string that should not be encoded again.
public sealed class MvcHtmlString : HtmlString
- Inheritance
-
MvcHtmlString
Constructors
MvcHtmlString(string)
Initializes a new instance of the MvcHtmlString class.
public MvcHtmlString(string value)
Parameters
value
stringThe string to create. If no value is assigned, the object is created using an empty-string value.
Fields
Empty
Contains an empty HTML string.
public static readonly MvcHtmlString Empty
Field Value
Methods
Create(string)
Creates an HTML-encoded string using the specified text value.
public static MvcHtmlString Create(string value)
Parameters
value
stringThe value of the string to create .
Returns
- MvcHtmlString
An HTML-encoded string.
IsNullOrEmpty(MvcHtmlString)
Determines whether the specified string contains content or is either null or empty.
public static bool IsNullOrEmpty(MvcHtmlString value)
Parameters
value
MvcHtmlStringThe string.
Returns
- bool
true if the string is null or empty; otherwise, false.