Table of Contents

Interface IHtmlHelper

Namespace
ToSic.Sxc.Dnn.Web
Assembly
ToSic.Sxc.Dnn.Razor.dll

Helper to quickly "raw" some html. Important: When using Oqtane, the Html object has many more features - check the .net documentation.

[PublicApi]
public interface IHtmlHelper

Methods

Partial(string, object)

Render a razor file to the page. This mimics the .net core API Html.Partial() in DNN

IHtmlString Partial(string path, object data = null)

Parameters

path string

path/file of razor, like "../shared/_list-item.cshtml"

data object

TODO new v16.00

Returns

IHtmlString

Raw(object)

Returns a HtmlString which Razor will output as Raw Html.

IHtmlString Raw(object stringHtml)

Parameters

stringHtml object

Returns

IHtmlString

An HtmlString object which will be not be html-encoded when added to a page with @Html.Raw(...)