Skip to main content

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

This error will occurs when you try to modify in Page Header through the C# Coding or uploading and aplying a skin that is refering some images or trying to resolve url <script> or <style> references in the page head.

So Use

<script type="text/javascript" src="<%#Page.ResolveUrl("js/prototype.js")%>"/> instead of


<script type="text/javascript" src="<%=Page.ResolveUrl("js/prototype.js")%>"/>

to solve the problem.

Even this can be happen that you will get  blank ("") value such as  src="" . For this you can move these lines
and put your code/script from "head" tag to "body" tag will solve the problem.


Comments