Nucleus .Net Core CMS

TagBuilderExtensions Class

Namespace: Nucleus.ViewFeatures
Assembly: Nucleus.ViewFeatures.dll
Tag Builder extensions used by HtmlHelpers, TagHelpers and internal rendering classes.
GetAttribute (Object htmlAttributes, String key)
Retrieve an html attribute value
Parameters
Name Type
htmlAttributes Object
key String
GetAttributes (Object htmlAttributes)
Convert html attributes object to a Dictionary of string/object
Parameters
Name Type
htmlAttributes Object
MergeAttributes (TagBuilder builder, Object htmlAttributes)
Merge an anonymous object containing HTML attributes with the attributes of a TagBuilder.
Parameters
Name Type
builder Microsoft.AspNetCore.Mvc.Rendering.TagBuilder

The TagBuilder to merge the HTML attributes into.

htmlAttributes Object

Anonymous object containing HTML attributes.

ToContent (String value)
Convert a string value to a Microsoft.AspNetCore.Html.HtmlContentBuilder containing the string.
Parameters
Name Type
value String

String value.

Returns
A HtmlContentBuilder containing the string.
ToHtmlContent (String value)
Convert a string value to a Microsoft.AspNetCore.Html.HtmlContentBuilder containing the string.
Parameters
Name Type
value String

String value.

Returns
A HtmlContentBuilder containing the string.