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

23:35

ERROR:

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

SOLUTIONS:

Step 1: Please change any [<%=] To [<%#].
Step 2: If your page [HEAD] tag(Master or Any page) contains server tag like below code:

[<script type="text/javascript" src='<%#ResolveUrl("~/script/jquery.min.js")%>'></script>]

Then it should be move under the [BODY] tag.

You Might Also Like

0 comments