Razor MVC UI reuse
I cant believe that I cannot figure this out, but how do I create the equivalent of a react or blazor component in MVC Razor?
I have this code
That I want to turn into <SimpleEditor asp-for="PimId/> or something similiar. But I just cant find the right direction.
ViewComponents? TagHelper?
I think its more difficult because these are ModelExpressions. PimId comes from the Model of the original component. This has to be one of the most common reuse patterns to ever exist, but there is nothing online.
3 Replies
hmm doesnt look right
Partials