错误控件集合无法修改,它包含代码块.....

编程入门 行业动态 更新时间:2024-10-28 12:18:30
本文介绍了错误控件集合无法修改,它包含代码块.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

请帮助我.. 这是我的注册标签:

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">

我在错误消息中进行了搜索,这可能是原因(但是我们不确定,因为您没有发布该代码的所有代码有问题的页面: aspnetresources/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: aspnetresources/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 [^].

更多推荐

错误控件集合无法修改,它包含代码块.....

本文发布于:2023-11-25 00:59:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627662.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   错误   代码

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!