IHtmlHelper.Raw Method

Definition

Overloads

Raw(Object)

Wraps HTML markup from the string representation of an Object in an HtmlString, without HTML-encoding the string representation.

Raw(String)

Wraps HTML markup in an HtmlString, without HTML-encoding the specified value.

Raw(Object)

Source:
IHtmlHelper.cs

Wraps HTML markup from the string representation of an Object in an HtmlString, without HTML-encoding the string representation.

C#
public Microsoft.AspNetCore.Html.IHtmlContent Raw (object value);

Parameters

value
Object

The Object to wrap.

Returns

IHtmlContent containing the wrapped string representation.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

Raw(String)

Source:
IHtmlHelper.cs

Wraps HTML markup in an HtmlString, without HTML-encoding the specified value.

C#
public Microsoft.AspNetCore.Html.IHtmlContent Raw (string value);

Parameters

value
String

HTML markup String.

Returns

A new IHtmlContent containing the wrapped String.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0