例子:

@{Html.Telerik().Splitter().Name("MainSplitter")
.Orientation(SplitterOrientation.Vertical)
.Panes(vPanes =>
{
vPanes.Add()
.Size("50px")
.Content(
@<text>
Epx Studio
</text>
)
vPanes.Add()
.Content(
@<text>
@{
@Html.Telerik().TabStrip()
.Items(tabstrip =>
{
tabstrip.Add()
.Text("Tab 1")
.Content(
@<text>
@RenderSection("tabOneContents", false);
</text>
);
}
}
</text>
);
})
.Render();
}

嵌套@<text>错误,错误信息Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed

MVC 引擎不允许潜逃@<Text>,@<p> ,@div,

解决方案,用帮助方法,帮助方法(helper function(是在view里定义的方法,使用如下

{Html.Telerik().Splitter().Name("MainSplitter")
.Orientation(SplitterOrientation.Vertical)
.Panes(vPanes =>
{
vPanes.Add()
.Size("50px")
.Content(
@<text>
Epx Studio
</text>
)
vPanes.Add()
.Content(
@<text>
@RenderTabStrip()
</text>
);
})
.Render();
} @helper RenderTabStrip()
{
@{Html.Telerik().TabStrip()
.Items(tabstrip =>
{
tabstrip.Add()
.Text("Tab 1")
.Content(
@<text>
@RenderSection("tabOneContents", false);
</text>
);
}
}
}

嵌套错误Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed的更多相关文章

  1. mybatis 报The content of elements must consist of well-formed character data or markup. 语法格式错误

    最近在写sql的时候 同时使用到了 >= 和 <= 之前只使用一个的时候 没有什么问题,今天同时使用到了两个,结果xml出现了The content of elements must co ...

  2. ibatis配置文件中的XML解析错误The content of elements must consist of well-formed character data or markup.

    在检查过所有的标签名都没有问题的情况下. xml中的小于号属于非法字符. SQL语句中则可能需要小于号,此时就需要用<![CDATA[  ]]>将小于号包裹,如此不会被xml解析器解析. ...

  3. Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.

    Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org ...

  4. ibatiS启动的异常 The content of elements must consist of well-formed character data or markup

    ibatiS启动的异常 The content of elements must consist of well-formed character data or markup 配置的动态SQL语句里 ...

  5. FreeRTOS 中断优先级嵌套错误引发HardFault异常解决(转)

      最近在使用FreeRTOS的时候,突然发现程序在运行了几分钟之后所有的任务都不再调用了,只有几个中断能正常使用,看来是系统挂掉了,连续测试了几次想找出问题,可是这个真的有点不知所措.      我 ...

  6. FreeRTOS 中断优先级嵌套错误引发HardFault异常解决

          最近在使用FreeRTOS的时候,突然发现程序在运行了几分钟之后所有的任务都不再调用了,只有几个中断能正常使用,看来是系统挂掉了,连续测试了几次想找出问题,可是这个真的有点不知所措.   ...

  7. The content of elements must consist of well-formed character data or markup

    java 中使用dom4j解析含有特殊字符的xml文件出现了如题的错误 这个时候需要在特殊字符外面加上 <![CDATA[ /6169220648+20671/1>7+-47390045& ...

  8. Mybatis 异常: The content of elements must consist of well-formed character data or markup

    原因很简单:在ibatis的配置文件中不能出现小于号(>)     <delete id="deleteByPrimaryKey" parameterType=&quo ...

  9. android switch(String)错误:Cannot switch on a value of type String for source level below 1.7

    switch语句的判断条件可以接受int,byte,char,short,不能接受其他类型只有JDK版本1.7以上才可以支持String 设置如下可解决问题:(若没有JDK1.7版,可下载一下安装)菜 ...

随机推荐

  1. [LeetCode]题解(python):054-Spiral Matrix

    题目来源 https://leetcode.com/problems/spiral-matrix/ Given a matrix of m x n elements (m rows, n column ...

  2. ECSHOP不同商品分类调用不同模板

    1.在ecs_category 表 添加 template 字段 可以在后台运行sql语句:alter table `ecs_category` Add column template text NO ...

  3. ar1020 驱动移植 无效

    移植ar1020的spi驱动.驱动移植过来后,在原来的板子上都能够正常运行,而在新的板子却没有效果. 最后查看新旧板子的AR1020的电路,发现M2引脚连接不同.M2高电平连接的touch是5线的接口 ...

  4. Java获取本地IP地址

    import java.net.InetAddress; import java.net.UnknownHostException; public class IpTest { public stat ...

  5. 通过iphone蓝牙与经过苹果MFI授权认证的硬件通讯,传输图片(转)

    http://blog.csdn.net/hwj2012/article/details/7883711 相关: http://blog.csdn.net/xufeidll/article/detai ...

  6. Android 使用PullToRefreshExpandableListView不能setAdapter的问题

    private PullToRefreshExpandableListView lv; lv = (PullToRefreshExpandableListView) findViewById(R.id ...

  7. PHP for 循环

    <!DOCTYPE html> <html> <body> <?php for ($x=0; $x<=10; $x++) { echo "数字 ...

  8. 在Xcode6.1.1模拟器中点击UITextView不出现软键盘?

    使用Xcode6.1.1做一个小项目时,在storyboard中添加了一个UITextField,使用模拟器运行后,点击UITextField出现光标,也可以从外接键盘上输入文字,但是就是不出现软键盘 ...

  9. eclipse下部署web工程的两种方式

    习惯了Eclipse 的开发,就觉得不想那么懒去用MyEclipse傻瓜式的部署工程. 第一种,手动部署工程. 情况一:如果工程目录在tomcat目录的webapp目录下,这种情况就不需要有工程部署的 ...

  10. PostgreSQL Replication之第九章 与pgpool一起工作(7)

    9.7 处理故障转移和高可用 可以使用pgpool来解决的一些明显的问题是高可用性和故障转移.一般来讲,有使用pgpool或者不使用pgpool可以用来处理这些问题的各种方法. 9.7.1 使用Pos ...