Is there any way to get a TagHelper to render another TagHelper?
Example TagHelpers;
public class OuterTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)
{
output.TagName = "";
output.Content.SetContent("Hello <inner></inner>");
}
}
public class InnerTagHelper : TagHelper
{
public override void Process(TagHelperContext context, TagHelperOutput output)
{
output.TagName = "";
output.Content.SetContent("World!");
}
}
Example View;
<outer></outer>
Expected Result;
Hello World!
I know I probably should use a ViewComponent instead, but is it at all possible to achieve the expected behavior presented above?