DictionaryTagHelper Class

DictionaryTagHelper Class

Renders a dictionary value for the current request culture.

[HtmlTargetElement("re-dictionary", Attributes = "key")]
[HtmlTargetElement(Attributes = "re-dictionary-key")]
public class DictionaryTagHelper: TagHelper

Inheritance  TagHelper DictionaryTagHelper

Constructors

Name Description
DictionaryTagHelper(IRedaktContext) Default constructor. Services are injected by the IoC container.

Properties

Name Description
CultureName If specified, renders the dictionary value for the specified culture. If empty, the current request culture is used.
Key Gets or sets the dictionary key to render the value for.
TagDictionaryKey Gets or sets the dictionary key to render the value for. This property is used when the key is passed to a regular tag with 're-dictionary-key'.
TagName If specified, wraps the dictionary value in the provided tag name. If the dictionary value is empty, no tag is rendered.

Methods

Name Description
ProcessAsync(TagHelperContext, TagHelperOutput)