控件包含代码块(即 <% ... %>),因此无法修改控件集合。

每次遇到这个问题都想骂人。

解决办法  <head > <%--runat="server"--%>

参考:https://blog.csdn.net/haipingma/article/details/6757317