ASP.NET - error when using ajax toos in asp.net

Asked By mani on 24-Nov-11 05:22 AM
hi..i am getting error when using ajax tool like below..

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

please anyhelp???
Jitendra Faye replied to mani on 24-Nov-11 05:27 AM
First, start the code block with <%# instead of <%=

Like this-

Use <%# this.txtCompany.ClientID %> to replace <%= this.txtCompany.ClientID %> to fix the problem.
Reena Jain replied to mani on 24-Nov-11 05:45 AM
hi,

I can confirm that moving the javascript with <% %> tags from the head to the form tag fixes this error

http://italez.wordpress.com/2010/06/22/ajaxcontroltoolkit-calendarextender-e-strana-eccezione/


Hope this will help you
mani replied to Jitendra Faye on 24-Nov-11 06:12 AM
hi..thanks for u r reply..it works fine..
Jitendra Faye replied to mani on 24-Nov-11 06:46 AM
You always welcome.