例子:

@{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. 2014-4-25 运行号:837344 ASCII码排序

    #include <iostream> #include <cstdio> #include <cstdlib> #include <string> # ...

  2. web调试工具-firebug

    Firebug是网页浏览器firefox下面的一款开发类插件.它集HTML查看和编辑,js控制台,网络状况监视器于一体,是开发js,css,HTML:和Ajax的得力助手 (自己整理的,有错误的话见谅 ...

  3. Marshal.SecureStringToBSTR

    Marshal.StringToBSTR 方法 命名空间:System.Runtime.InteropServices程序集:mscorlib(在 mscorlib.dll 中) // 使用一个Int ...

  4. JMeter学习-003-JMeter与LoadRunner的异曲同工

    本节主要对 JMeter 与 LoadRunner 的优缺点进行概要的总结,若有不足之处,敬请指正,不胜感激! 同时,我也不得不承认,在对 JMeter 和 LoadRunner 进行比较时,我个人的 ...

  5. C# serialport

    最近使用C#写串口的程序,实现串口助手的功能,参考文档记录于此. 参考文档 http://blog.csdn.net/geekwangminli/article/details/7851673 htt ...

  6. JavaScript:通过id来进行元素的取得

    每一个HTML元素都使用id来进行一个标注,随后可以通过document.getElementById(“ID名称”)取得指定的ID元素对象,取得元素对象之后就可以对其进行操作. 但是document ...

  7. 禁用ipv6

    禁用ipv6 1.在/etc/sysctl.conf 添加一行:net.ipv6.conf.all.disable_ipv6=1 2.在/etc/sysconfig/network 添加一行:NETW ...

  8. mysql怎么终止当前正在执行的sql语句

    mysql怎么终止当前正在执行的sql语句 show processlist; kill 要杀的ID kill 7

  9. 在虚拟机中安装Ubuntu Server 15.04

    学Linux,上红联! 红联Linux门户|Linux通用技术|Linux发行版技术|Linux企业应用|Linux实验室|红联Linux论坛 Linux系统教程 Linux入门 Linux管理 Li ...

  10. linux shell 输入密码不显示

    1 read -s -p "YOUR PassWord:" pa echo "${pa}" 2 [liujianzuo@ow2 mysql_scri]$ cat ...