I am running into an issue with the RadAjaxManager and receiving the *incredibly* annoying .Net error (why they care is beyond me):
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Below is my AjaxManager control markup. The error only occurs when I set EnableAjax to True. If it is False, the error doesn't show up.
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" EnableAJAX="true" EnableHistory="true" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> | |
<AjaxSettings> | |
<telerik:AjaxSetting AjaxControlID="radFolders" EventName="radFolders_OnNodeClick"> | |
<UpdatedControls> | |
<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadGridLoadingPanel" /> | |
</UpdatedControls> | |
</telerik:AjaxSetting> | |
<telerik:AjaxSetting AjaxControlID="radFolders" EventName="radFolders_OnNodeEdit"> | |
<UpdatedControls> | |
<telerik:AjaxUpdatedControl ControlID="radFolders" LoadingPanelID="RadTreeViewLoadingPanel1" /> | |
</UpdatedControls> | |
</telerik:AjaxSetting> | |
<telerik:AjaxSetting AjaxControlID="radFolders" EventName="radFolders_OnContextMenuItemClick"> | |
<UpdatedControls> | |
<telerik:AjaxUpdatedControl ControlID="radFolders" LoadingPanelID="RadTreeViewLoadingPanel1" /> | |
</UpdatedControls> | |
</telerik:AjaxSetting> | |
</AjaxSettings> | |
</telerik:RadAjaxManager> | |
The weirdest part about this is the fact that the above control clearly shows no code blocks exist, and in fact the only one that is on the entire page can be taken out and the error still comes up. Since I have the source code I have linked your project to mine and the error is showing up here:
Line 880: int updatedLocation = controls.IndexOf(updated);
Line 881:
Line 882: controls.AddAt(updatedLocation, pre);Line 883:
Line 884: PostControlToAjaxify post = new PostControlToAjaxify(updated);
|
Source File: C:\dev\components\telerik.web.ui\06.19.2008\Ajax\RadAjaxControl.cs Line: 882
Any suggestions as to what might cause this?