only-once

The only-once tag helper ensures that the property mentioned in its asp-for attribute is rendered only once within the html page.

<only-once asp-for="@MyProperty">
    <store-model asp-for="@MyProperty"/>
</only-once>

Fork me on GitHub