I have a webpage with ASPX that utilizes JavaScript and ASP components without issues. However, after adding a Telerik combobox, I encountered an error:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)
Previously, my JavaScript code was functioning well before integrating the Telerik code:
$(function () {
$("#<%=CountryCity1.ClientID%>").hide();
...
...
Containing:
<div id="CountryCity1" runat="server">
Furthermore, there is a jQuery autocomplete service within the same script that has now ceased to work.
As a solution, I made the following changes:
$(function () {
$("#<%#CountryCity1.ClientID%>").hide();
...
...
And:
<div id="CountryCity1" runat="server">
Despite these adjustments, the page remains problematic due to the addition of the Telerik code snippet:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadComboBox1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadComboBox2" />
<telerik:AjaxUpdatedControl ControlID="RadComboBox3" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadComboBox2">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadComboBox3" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />