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)


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

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


Return Value

Type: System.Web.IHtmlString
The unencoded HTML.


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


HtmlHelper Class

Raw Overload

System.Web.WebPages.Html Namespace