HtmlHelper.Raw Method (Object)

Wraps HTML markup in an HtmlString instance so that it is interpreted as HTML markup.

Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Function Raw ( _
    value As Object _
) As IHtmlString
'Usage
Dim instance As HtmlHelper 
Dim value As Object 
Dim returnValue As IHtmlString 

returnValue = instance.Raw(value)
public IHtmlString Raw(
    Object value
)
public:
IHtmlString^ Raw(
    Object^ value
)
member Raw : 
        value:Object -> IHtmlString
public function Raw(
    value : Object
) : IHtmlString

Parameters

Return Value

Type: System.Web.IHtmlString
The unencoded HTML.

Remarks

The Razor syntax @ operator HTML-encodes text before rendering it. This causes the text to be displayed as regular text in the web page instead of being interpreted as HTML markup.

Use the Raw method when the specified text represents an actual HTML fragment that should not be encoded and that you want to render as markup.

See Also

Reference

HtmlHelper Class

Raw Overload

System.Web.WebPages.Html Namespace