This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Unable to utilize ModelExpression with [HtmlAttributeName(DictionaryAttributePrefix = "myprefix-")] Dictionary #5310
Closed
Description
Within razor, I've created the following:
<div myprefix-test="@Model.Value"></div>
I'd like to be able to create a tag helper with the following so I can create multiple [expression bound] attributes witht he same prefix.
[HtmlAttributeName(DictionaryAttributePrefix = "myprefix-")]
public IDictionary<string, ModelExpression> Values { get; set; } = new Dictionary<string, ModelExpression>();
However when running the application, I receive the following as runtime:
Dictionary values must not be of type 'Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression'.
I should note that the razor tooling accepts the markup above.
Any thoughts would be greatly appreciated.