The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

记着,下午再写!

这个错误是由于在页面中用到asp.net ajax tookit控件中的选项卡控件,然后又用了updatepanel套住!

解决办法:主要是在页面js里面有用到<%=%这个标记。如果用到的话,就把这段移到body下面。就可以了!

原文地址:https://www.cnblogs.com/nyth/p/2059715.html