Hello,
I have an if else condition which is covered by RadCodeBlock. When I try to bind any control as an updated control in RadCodeBlock by using RadAjaxManagerProxy, it throws below error.
For example; rcbCustomer is binded to rlCustomer. But it causes error. Because rlCustomer is in RadCodeBlock.
Here is RadCodeBlock;
<telerik:RadCodeBlock ID="rcodeCustomer" runat="server">
<table class="fieldset-table">
<% if (User.IsInRole("ADMIN"))
{ %>
<tr>
<td>
<telerik:RadLabel runat="server" Text="Customer" Font-Size="Large" ForeColor="Black" />
</td>
<td>
<telerik:RadLabel runat="server" Text=":" ForeColor="Black" Font-Bold="false" />
</td>
<td>
<telerik:RadComboBox MarkFirstMatch="true" ID="rcbCustomer" EmptyMessage="Please Select Customer" runat="server" Width="100%" DataValueField="ID" DataTextField="Name" AutoPostBack="true" OnSelectedIndexChanged="rcbCustomer_SelectedIndexChanged" />
<asp:RequiredFieldValidator
runat="server"
Display="Dynamic"
ControlToValidate="rcbCustomer"
ErrorMessage="Customer is required!"
CssClass="validator" />
</td>
<td class="center" style="width: 100px">
<telerik:RadButton runat="server" ID="rbCustomerReload" ToolTip="Reload Customers" Icon-PrimaryIconCssClass="rbRefresh" BackColor="White" OnClick="rbCustomerReload_Click" />
<telerik:RadLinkButton runat="server" ToolTip="Add New Customer" Icon-CssClass="rbAdd" BackColor="White" Target="_blank" NavigateUrl="AdminUser.aspx" />
</td>
</tr>
<tr>
<td colspan="3">
<telerik:RadLabel ID="rlCustomer" runat="server" ForeColor="#333333" Font-Bold="false" Font-Size="Medium" Visible="false" />
</td>
</tr>
<%} %>
</table>
</telerik:RadCodeBlock>
Here is RadAjaxManagerProxy;
<telerik:AjaxSetting AjaxControlID="rcbCustomer">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rlCustomer" LoadingPanelID="RadAjaxLoadingPanel" />
<telerik:AjaxUpdatedControl ControlID="rcbCustomerContact" LoadingPanelID="RadAjaxLoadingPanel" />
<telerik:AjaxUpdatedControl ControlID="rlCustomerContact" LoadingPanelID="RadAjaxLoadingPanel" />
<telerik:AjaxUpdatedControl ControlID="rcbCustomerAddress" LoadingPanelID="RadAjaxLoadingPanel" />
<telerik:AjaxUpdatedControl ControlID="rlCustomerAddress" LoadingPanelID="RadAjaxLoadingPanel" />
</UpdatedControls>
</telerik:AjaxSetting>
Error;
Could you please help?
Thanks,