【发布时间】:2019-03-17 11:59:31
【问题描述】:
我可以在这样的页面中使用 ViewComponents。
<vc:parent-component>
<some random html>
</parent-component>
当我尝试这个时,它只呈现父组件。 在父组件的 cshtml 中,我正在寻找类似下面的内容
<h2>Parent component markup</h2>
@RenderChildren()??
<h2>Parent component markup end</h2>
所以结果会是
<h2>Parent component markup</h2>
@RenderChildren()
<h2>Parent component markup end</h2>
【问题讨论】:
标签: asp.net-core asp.net-core-viewcomponent