hello,
in my ASPX webforms i use UserControls for a header and footer. like so:
...however, if in my UserControl i include a RadControl then I get this error:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
why is this? i am not using javascript or codeblocks. tho perhaps the RadControls are, i dunno.
ASCX
thanks
matt
in my ASPX webforms i use UserControls for a header and footer. like so:
<body> |
<form id="form1" runat="server"> |
<Me:Header ID="myHeader" runat="server" /> |
<h1>my page</h1> |
<p>my content</p> |
<Me:Footer ID="myFooter" runat="server" /> |
</form> |
</body> |
...however, if in my UserControl i include a RadControl then I get this error:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
why is this? i am not using javascript or codeblocks. tho perhaps the RadControls are, i dunno.
ASCX
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Header.ascx.cs" Inherits="AutomaticVehicleLocator.controls.nav.Header" %> |
<%@ Register TagPrefix="Telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
<div id="Header"> |
<img id="imgLogo" src="/images/logo.gif" alt="NOPD Logo" width="59" height="56" runat="server" /> |
<div id="userInfo"> |
<asp:Label ID="lblUsername" runat="server" /><br /> |
<a href="" class="help" id="btnSubmit">Help</a> |
</div> |
<!-- THIS BREAKS PAGE --> |
<Telerik:RadComboBox ID="rcbTest" runat="server"> |
<Items> |
<telerik:RadComboBoxItem Value="1" Text="one" /> |
</Items> |
</Telerik:RadComboBox> |
</div> |
thanks
matt