嵌套错误Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed
例子:
@{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的更多相关文章
- mybatis 报The content of elements must consist of well-formed character data or markup. 语法格式错误
最近在写sql的时候 同时使用到了 >= 和 <= 之前只使用一个的时候 没有什么问题,今天同时使用到了两个,结果xml出现了The content of elements must co ...
- ibatis配置文件中的XML解析错误The content of elements must consist of well-formed character data or markup.
在检查过所有的标签名都没有问题的情况下. xml中的小于号属于非法字符. SQL语句中则可能需要小于号,此时就需要用<![CDATA[ ]]>将小于号包裹,如此不会被xml解析器解析. ...
- 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 ...
- 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语句里 ...
- FreeRTOS 中断优先级嵌套错误引发HardFault异常解决(转)
最近在使用FreeRTOS的时候,突然发现程序在运行了几分钟之后所有的任务都不再调用了,只有几个中断能正常使用,看来是系统挂掉了,连续测试了几次想找出问题,可是这个真的有点不知所措. 我 ...
- FreeRTOS 中断优先级嵌套错误引发HardFault异常解决
最近在使用FreeRTOS的时候,突然发现程序在运行了几分钟之后所有的任务都不再调用了,只有几个中断能正常使用,看来是系统挂掉了,连续测试了几次想找出问题,可是这个真的有点不知所措. ...
- The content of elements must consist of well-formed character data or markup
java 中使用dom4j解析含有特殊字符的xml文件出现了如题的错误 这个时候需要在特殊字符外面加上 <![CDATA[ /6169220648+20671/1>7+-47390045& ...
- Mybatis 异常: The content of elements must consist of well-formed character data or markup
原因很简单:在ibatis的配置文件中不能出现小于号(>) <delete id="deleteByPrimaryKey" parameterType=&quo ...
- 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版,可下载一下安装)菜 ...
随机推荐
- JS-003-innerText 与 innerHTML 区别
此文主要讲述在使用 innerText 和 innerHTML 获取元素中间值时的差别,我个人将二者的区别简单的理解为: webelement.innerText : 获取的是页面元素显示的文本 we ...
- synzhronized原理3
1.java中的每个对象都可作为锁,有三种表现形式: 对于普通方法,锁的是当前this对象. 对于静态方法,锁的是class对象 对于方法块,锁的是synchronized指定的对象. 2.JVM基于 ...
- logback配置详解(二)
<appender> <appender>: <appender>是<configuration>的子节点,是负责写日志的组件. <appende ...
- What algorithm to use to normalize someone's face on image
http://stackoverflow.com/questions/7066104/what-algorithm-to-use-to-normalize-someones-face-on-image
- window.open被浏览器拦截的解决方案
现象 最近在做项目的时候碰到了使用window.open被浏览器拦截的情况,搞得人无比郁闷啊,虽然在自己的环境可以对页面进行放行,但是对用户来说,不能要求用户都来通过拦截.何况当出现拦截时,很多小白根 ...
- Demo4 Slides.js的使用
Slides.js挺好用的啊,把示例中的Demo调试通了.首先把css.img.js文件夹下的内容全部拷贝到Vs网站项目下的Scripts文件夹下. 代码主要修改了一些图片路径和网址链接. <! ...
- javascript设计模式学习之十五——装饰者模式
一.装饰者模式定义 装饰者模式可以动态地给某个对象添加一些额外的职责,而不会影响从这个类中派生的其他对象.这种为对象动态添加职责的方式就称为装饰者模式.装饰者对象和它所装饰的对象拥有一致的接口,对于用 ...
- Java多例设计模式
class TrafficLight{ private String lightType; private static final TrafficLight GREENLIGHT = new Tra ...
- 到底UDP和TCP是什么个概念?
今天在论坛看到一牛人对tcp和udp的解释和区分,突然间恍然大悟. 以下全为拷贝. 在现实生活中,“要想富,先修路”:同时人总要“居有定所”,于是盖起了N多的房子.但是当你和同事商量好去做客的时候却发 ...
- java.util.concurrent包
在JavaSE5中,JUC(java.util.concurrent)包出现了 在java.util.concurrent包及其子包中,有了很多好玩的新东西: 1.执行器的概念和线程池的实现.Exec ...