I received a nasty error:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% … %>).
What?!? Well after some research I found an alternative solution using databinding, here are the steps I used to remedy the problem:
- Change your server side tags from <%=to <%#
- On the Master Page code behind in the Page_Load event place the following snippet of code:
This should take care of the problem, if you are still having issues tweet me: @tekguy.