Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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. <% ... %>).
Posted
Updated 7-Sep-11 1:36am
v3

Did you add ScriptManager?.
ASP.NET
<asp:scriptmanager id="ScriptManager1" runat="server">
 
Share this answer
 
v3
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 [^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900