This project is read-only.
1
Vote

Code Blocks Cause Problems

description

Great solution overall- lots of good functionality in there. I have noticed that is seems to return this error when it encounters code blocks (<%= ... %>)
 
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
 
Anyone else seeing this?

comments

MilanNegovan wrote Feb 9, 2011 at 10:36 PM

Thank you for the feedback!

This is actually quite a common issue specific to ASP.NET itself. Please see this:

http://aspnetresources.com/blog/code_blocks_inside_master_pages_cause_trouble
or
http://www.west-wind.com/weblog/posts/5758.aspx,

or Google for this specific error. You'll find a lot of posts about it.

hakank wrote Jan 3, 2012 at 1:13 PM

If you use server <%=...%> tags between a placeholder <PlaceHolder></Palceholder> your problem will be solved.

<PlaceHolder>
<%=
....
%>
<PlaceHolder/>

hakank wrote Jan 3, 2012 at 1:17 PM

If you use server <%=...%> tags between a placeholder <PlaceHolder></Palceholder> your problem will be solved.

<PlaceHolder>
<%=
....
%>
<PlaceHolder/>

hakank wrote Jan 3, 2012 at 1:17 PM

If you use server <%=...%> tags between a placeholder <PlaceHolder></Palceholder> your problem will be solved.

<PlaceHolder>
<%=
....
%>
<PlaceHolder/>

wrote Feb 13, 2013 at 11:32 PM