Nucleus .Net Core CMS

TagBuilderExtensions Class

Namespace: Nucleus.ViewFeatures
Assembly: Nucleus.ViewFeatures.dll
Tag Builder extensions used by HtmlHelpers, TagHelpers and internal rendering classes.

Methods

ToContent (String) Method

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) Method

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.

MergeAttributes (TagBuilder,Object) Method

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.

GetAttributes (Object) Method

GetAttributes (Object htmlAttributes)
Convert html attributes object to a Dictionary of string/object
Parameters
Name Type
htmlAttributes Object

GetAttribute (Object,String) Method

GetAttribute (Object htmlAttributes, String key)
Retrieve an html attribute value
Parameters
Name Type
htmlAttributes Object
key String