RadComboBox for ASP.NET

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>) Send comments on this topic.
TroubleShooting > The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)

Glossary Item Box

If you receive exceptions such as: 

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

you need to move the javascript code block outside of the head tag. For example:

Before: Copy Code
<head runat="server">
   
<script>
   
var controlClientObject = <%= RadControl1.ClientID %>
   
...
   
</script>
</
head>

<
body>
...
</body>
After: Copy Code
<head runat=a?servera?>
</
head>
<
body>
   
<script>
   
var controlClientObject = <%= RadControl1.ClientID %>
   
...
   
</script>
...
</body>