Last post Aug 16, 2013 06:15 AM by AidyF
Aug 15, 2013 08:51 AM|Smadhu|LINK
hosted website on new server.......n getting error.............plz suggest
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
how to solve the error page was working completely fine as i chnaged the server its creating issue now
Aug 15, 2013 08:57 AM|AidyF|LINK
You are trying to programatically add controls to a container that has code in <% %> blocks in the mark-up. Best thing is to remove the script blocks and replicate the functionality in code-behind.
Aug 16, 2013 05:33 AM|Smadhu|LINK
how can i solve the issue????
plz check link to see error : http://www.harlequin.agora-me.com/ValidateEmail.aspx?email=rigidpankaj%40gmail.com&vc=1709064091
Aug 16, 2013 05:41 AM|AidyF|LINK
Remove the <% %> block from the control that is giving you the error. You'll need to find a different way of doing what the code in the <% %> block was doing.
Aug 16, 2013 06:07 AM|Smadhu|LINK
the <% %> block code is already removed.....................but still its giving same error
Aug 16, 2013 06:15 AM|AidyF|LINK
Are you sure it is the right thing you've removed the code block from? It wouldn't be giving the error unless there were code blocks.