Hi,
I have a radpanelbar in a RadAjaxUpdate panel . I need to post back the page when i click or expand the radpanel item . But got an error.
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) at Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
I have the following code
I have a radpanelbar in a RadAjaxUpdate panel . I need to post back the page when i click or expand the radpanel item . But got an error.
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>). at System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) at Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
I have the following code
<telerik:RadAjaxPanel ID="DemoPanelBarPanel" runat="server" EnableAJAX="true"> <telerik:RadPanelBar ID="uxProfileList" OnClientItemClicked="OnClientItemExpand" OnClientItemExpand="OnClientItemExpand" ExpandMode="FullExpandedItem" Width="100%" runat="server"> <Items> <telerik:RadPanelItem runat="server" Text="Personal Info" Value="PersonalInfo" Font-Bold="true" > </telerik:RadPanelItem> <telerik:RadPanelItem runat="server" Text="Profile Info" Value="ProfileInfo" Font-Bold="true" > </telerik:RadPanelItem> <telerik:RadPanelItem runat="server" Text="Education" Value="Education" Font-Bold="true" > </telerik:RadPanelItem> <telerik:RadPanelItem runat="server" Text="WorkExperience" Value="WorkExperience" Font-Bold="true" > </telerik:RadPanelItem> </Items> </telerik:RadPanelBar></telerik:RadAjaxPanel><script type="text/javascript" language="javascript"> function OnClientItemExpand(sender, args) { $find("<%= DemoPanelBarPanel.ClientID%>").ajaxRequestWithTarget("<%= DemoPanelBarPanel.ClientID%>", args.get_item().get_value()); } </script>DemoPanelBarPanel.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(OnProfileAjaxPanelAjaxRequest);void OnProfileAjaxPanelAjaxRequest(object sender, AjaxRequestEventArgs e) { if (e.Argument.Equals("PersonalInfo")) { RadPanelItem item = uxProfileList.Items.FindItemByValue(e.Argument); } }