Tuesday, May 4, 2010

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


When I sued the above code in my aspx page I was getting the eroor as .

“The Controls collection cannot be modified because the control contains code blocks (i.e. ).”
This error can be solved by just replacing the code as below .

Other wise pass the control’s clientId as a parameter to the javascript function from thes server side code.

Replace your code as below will solve the issue.

You can also find other solution in the bleow link.
http://www.west-wind.com/weblog/posts/5758.aspx

No comments:

Post a Comment