This is a migrated thread and some comments may be shown as answers.

The Controls collection cannot be modified.

2 Answers 88 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
manoj
Top achievements
Rank 1
manoj asked on 23 Jan 2017, 06:12 AM
Hi Team,
i am creating Multi language selection feature in Web App using Global Resources,Local Resources and bootstrap(css and Js). But I am getting the following Error while rending telerik control.

Error:
"The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)."

Aspx Code:
<% if (dirs == "ar-EG")
       { %>

 <link href="../bootstrap-arabic/css/bootstrap-arabic.css" rel="stylesheet" />

    <% }
       else
       { %>

 <link href="../bootstrap/css/bootstrap.css" rel="stylesheet" />

 <% } %>

Aspx control working good with  same code but issue occur while use telerik control.  
What is the possible way solve this issue Please suggest.   

Regrads
Manoj Sahu.

2 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 24 Jan 2017, 12:54 PM
Hi Manoj,

The error you are seeing is most likely observed because you have JavaScript code that is not wrapped in a RadScriptBlock. Please ensure that all client-side code is placed inside RadScriptBlock and the error should disappear.




Regards,
Viktor Tachev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
manoj
Top achievements
Rank 1
answered on 25 Jan 2017, 05:28 AM

Hi Team,

thanks for the answer.

Regrads
Manoj Sahu
Tags
Ajax
Asked by
manoj
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
manoj
Top achievements
Rank 1
Share this question
or