错误控件集合无法修改,它包含代码块..... [英] error controls collection cant be modified it contains code block.....
本文介绍了错误控件集合无法修改,它包含代码块.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮助我..
这是我的注册标签:
Please help me ..
this is my register tag:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
我把这个文本框的压延控件放在了这样的
and i placed calender control for this text box like this
<asp:TextBox ID="txtPollExpDt" runat="server" />
<asp:ImageButton ID="imgcalnd" runat="server" Height="16" Width="16" ImageUrl="~/images/Calendar.png" />
<cc1:CalendarExtender ID="calcontl" runat="server" TargetControlID="txtPollExpDt"
PopupButtonID="imgcalnd" />
出现此错误
am getting this error
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
推荐答案
您添加了ScriptManager吗?.
Did you add ScriptManager?.
<asp:scriptmanager id="ScriptManager1" runat="server">
我在错误消息中进行了搜索,这可能是原因(但是我们不确定,因为您没有发布该代码的所有代码有问题的页面:
http://aspnetresources.com/blog/code_blocks_inside_master_pages_cause_trouble [ Google对该错误消息返回了超过38 000个结果 [
I googled the error message, and this may be the cause (but we can''t know for sure because you didn''t post all of the code for the page in question:
http://aspnetresources.com/blog/code_blocks_inside_master_pages_cause_trouble[^]
If that''s not it, here''s over 38 thousand results returned by google for that error message [^].
这篇关于错误控件集合无法修改,它包含代码块.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文