Page tab getting the "The controls collection cannonto be modified..." error

Jon Tibbetts asked on September 11, 2014 16:14

Hi, I'm getting the following error after upgrading to 8, my page tab worked fine in version 7.

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

Image Text

Correct Answer

Brenden Kehren answered on September 11, 2014 16:19

Do you have <%= %> anywhere in the page template? Good chance that is causing the error. You'd need to do a Page.DataBind() on the page load for that template. You could add this in the <script runat="server"> tag at the top of the page template.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Jon Tibbetts answered on September 11, 2014 16:55

A little more info... this is from the home page default.aspx

Image Text

0 votesVote for this answer Mark as a Correct answer

Jon Tibbetts answered on September 11, 2014 21:18

Yup that solved the issue, I had those characters in one of my master pages. But now I'm getting the following error in a subpage...

Only one instance of a ScriptManager can be added to the page.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on September 11, 2014 21:34

That would mean that you have more than one instance added. Check the front end of the page and see if the page is inheriting from any other page. If there is one in your master page, I would comment it out and see if that gets rid of the issue.

0 votesVote for this answer Mark as a Correct answer

Jon Tibbetts answered on September 11, 2014 23:27

Little update... the scriptmanager error only shows while logged into the cms. If I log out of the cms and not in preview mode. I don't see the error. My site works fine when not logged in the cms, but if logged in, things don't quite work right.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.