解决 The Controls collection cannot be modified because the control contains code blocks
通过本文主要向大家介绍了解决 The Controls collection cannot be modified because the control contains code blocks等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
在.aspx或.ascx的如果包括<%= %>,并在.aspx, .ascs中使用了AjaxToolkit中的控件,那么很可能会引发"The Controls collection cannot be modified because the control contains code blocks" 异常,
解决办法如下
1. 将<%= 换为<%#
2. 在.asp或模板页中的Page_Load事件中添加如下代码
</div>
解决办法如下
1. 将<%= 换为<%#
2. 在.asp或模板页中的Page_Load事件中添加如下代码
</div>