错误:The Controls collection cannot be modified because the control contains code blocks (i.e. ).

来源:互联网 发布:虚拟打印机安装软件 编辑:程序博客网 时间:2024/04/27 11:43


错误:The Controls collection cannot be modified because the control contains code blocks (i.e. ). .  

2012-07-23 18:24:18|  分类:默认分类 |  标签:|举报|字号 订阅

用 <%# %>这种写法是写在数据绑定控件中的,之所以用 <%= %>会出现The Controls collection cannot be modified because the control contains code blocks 这个错误,是因为这段代码是写在 <head> </heda>中的,而且head加了runat="server",所以它会出现这个错误,把这段js移到 </head>和 <body>之间就ok。

0 0