Reputation: 1702
I am using Ajax calendar in an ASP.NET application like below lines of codes
<asp:TextBox ID="txtDOB" placeholder="(mm/dd/yyyy)" runat="server" onchange="ValidateDate()">
</asp:TextBox>
<ajax:CalendarExtender ID="txtDOBCalendar" runat="server" Format="mm/dd/yyyy" TargetControlID="txtDOB">
</ajax:CalendarExtender>
It is not working. It throws error message like
"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."
Upvotes: 0
Views: 66
Reputation: 981
I guess there must be some code block <%= ...%>. Replace it with <%# ...%>. Hope it helps.
Upvotes: 1