79113442

Date: 2024-10-22 09:55:34
Score: 0.5
Natty:
Report link

A newer method of implementing this without custom code is to use DynamicComponent as described in this article

In a generic component it would look like this:

...
<DynamicComponent Type="tyepof(TFieldType)" Parameters="InputAttributes"></DynamicComponent>
...

One thing to note is that DynamicComponent does not capture any unmatched parameters, so you will have to pass them all in via the Parameters attribute. It has the type IDictionary<string,object> so if you catch them in your component you can easily pass them along.

Reasons:
  • Blacklisted phrase (1): this article
  • Has code block (-0.5):
Posted by: Elva