当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net core - Use TagHelper inside another TagHelper

问题描述:

I have build a custom tag helper that dynamicaly build a form with input tags.

Example

foreach(var foo in foos)

{

htmlOutput += $"<input asp-for='{foo.FieldName}' />";

}

then i want to model bind this, but my custom tag helper output the asp-for attribute instead of model bind it, probably because im trying to use a tag helper inside my custom tag helper. Any way to get around this?

分享给朋友:
您可能感兴趣的文章:
随机阅读: