0
我正在实现一个视图,其中有选项卡(Kendo TabStrip),这些选项卡内有一些手风琴项目(Kendo PanelBar)。 我使用foreach以dinamically绘制标签,并且在每个标签中,我还使用foreach绘制手风琴。问题是,每个手风琴项目的内容都是一个HTML字符串(如:<p>Some <strong>text</strong></p>
)。 在铬所有工作正常,但与IE8一切都熄灭(因为页面的HTML与字符串HTML混合)。Kendo PanelBar HTML字符串作为内容
这是我的代码:
@(Html.Kendo().TabStrip()
.Name("tabAyuda")
.HtmlAttributes(new { style = "" })
.Animation(false)
.SelectedIndex(0)
.Items(tabAyuda =>
{
foreach (KeyValuePair<string, IList<ElementoAyuda>> accion in Model)
{
if (!string.IsNullOrWhiteSpace(accion.Key))
{
tabAyuda.Add().Text(accion.Key)
.Content(@<text>
@(Html.Kendo().PanelBar()
.Name("panelbar" + accion.Key)
.ExpandMode(PanelBarExpandMode.Single)
.Items(panelbar =>
{
foreach (ElementoAyuda elemento in accion.Value)
{
panelbar.Add()
.Text(elemento.Head)
.Content(elemento.Detail);
}
})
)
</text>);
}
}
})
)
我也试过在代码里。内容:
.Content(@<text>
@Html.Raw(elemento.Detail)
</text>)
但我得到这个错误:自定义工具错误:Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed.
任何建议?
在此先感谢!