例子:

@{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):046-Permutations

    题目来源 https://leetcode.com/problems/permutations/ Given a collection of distinct numbers, return all ...

  2. Mac 系统下将普通文件变为可执行文件

    在使用Cocospods时,老是提示我pod文件里面有文稿的东西.后来想到前同事将他变为可执行文件了.所以百度了一下,方法如下: chmod +x (此处是文件的地址) 就可以了

  3. setContentScaleFactor 设置图片的分辨率

    float scale = [[UIScreenmainScreen] scale];//得到设备的分辨率 [imageView setContentScaleFactor:[[UIScreen ma ...

  4. ps、grep和kill联合使用杀掉进程(转)

    例如要杀掉hello这个进程,使用下面这个命令就能直接实现.   ps -ef |grep hello |awk '{print $2}'|xargs kill -9 这里是输出ps -ef |gre ...

  5. 在美国看中国HTML5市场的发展

    近日,APICloud 创始人兼CEO刘鑫在美国旧金山和美国的HTML5开发者进行了一次近距离的接触,感受中美HTML5开发者的热度差别和不同市场阶段的中美表现巨大差异. 中国和美国的HTML5市场差 ...

  6. 转 awk中RS,ORS,FS,OFS区别与联系

     今天用到awk ofs 看到一篇不错文章 awk中RS,ORS,FS,OFS区别与联系 张映 发表于 2010-12-02 分类目录: shell 标签:awk, FS, OFS, ORS, RS, ...

  7. 在网页中弹出qq临时会话

    http://www.54kefu.net/linshi/201202/391.html

  8. 使用sh-x调试shell脚本_转

    参考:http://blog.chinaunix.net/uid-20564848-id-73502.html 1. 通过sh -x 脚本名  #显示脚本执行过程2.脚本里set -x选项,轻松跟踪调 ...

  9. SocketServer model_use

    #!/usr/bin/env python #-*- coding:utf- -*- import SocketServer class MySocker(SocketServer.BaseReque ...

  10. dojo使用笔记: 自定义ConfirmDialog

    前言: dojo1.10已经有了原生的ConfirmDialog 做gui应用开发,肯定要用到"确认"对话框, 无论是winForm, swing,还是web,也不管理你用什么技术 ...