c# - 如何嵌套三个内联标记块?
问题描述
我正在尝试使用 Kendo UI 将三个东西相互嵌套 - 具体来说,一个 div 内部作为面板栏项目的内容,它位于标签条中。我收到此错误:Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed.
我查看了这个链接:Kendo widgets two level deep in Razor, inline markup blocks cannot be nested
但我不能使用它,因为该@helper
指令已在 ASP.NET Core 中删除,这是 ASP.NET MVC 可用的修复程序。有什么方法可以使用 .NET Core 解决这个问题?
这是错误的代码:
@(
Html.Kendo().TabStrip()
.Name("Stages")
.Items(stage => {
stage.Add().Text("Confirm Selections").Content(@<text>
@(
Html.Kendo().PanelBar()
.Name("Selections")
.Items(panelbar => {
panelbar.Add().Text("Selected ECUs")
.Content(@<div id="confirm" class="text-center"></div>);
})
)
</text>);
}
)
)
再次出现错误:Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed.
任何解决方法?
解决方案
我找不到解决此问题的方法。看起来这实际上是一个剃刀问题,而不是剑道 UI 问题。
https://www.telerik.com/forums/three-four-or-more-level-of-hierarchy-on-a-grid
我建议向 Telerik 提交一张票,看看他们是否能给你一个更具体的答案。
推荐阅读
- python - 如何告诉 Pip 在哪里缓存轮文件?
- swift - 为什么 AVAudioPlayer 的 currentTime 和 duration 为零?
- javascript - Yii2 - 通过在 GridView 中使用 Ajax/Pjax 切换工具更新数据
- python - 窗户上烧瓶的奇怪行为
- install4j - Install4j 8.0 发布时间表和功能
- mysql - 节点中的 MySQL 事务
- c - 是否可以在堆栈上分配结构,其定义隐藏在源文件中?
- android - 当我滚动或添加新项目时,RecyclerView 数据移动到其他项目
- ruby-on-rails - 如何在 Ruby 中添加带有条件的模型验证
- c++ - 在哪里放置指针?