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

Adding rad button causes error

1 Answer 13 Views
Button
This is a migrated thread and some comments may be shown as answers.
AName
Top achievements
Rank 1
AName asked on 21 Apr 2014, 05:01 PM
Hello, I am working with vb .net and within an existing project that uses telerik, i imported some user controls.

My hope is to convert existing controls to rad controls, however when adding a rad button...or any control..
I get the following error

"The Controls collection cannot be modified because the control contains code blocks"

steps i have taken to try to correct issue are as follows.
1.  I changed <%= to <#=
2.  wrapped JavaScript around a RadCodeBlock
3. Attempted a radscriptmanger but i already have one declared so error occurs. 

I do not know what to try at this point.
As expressed this is an existing project, the only thing that might be a curveball is.
This imported code is called from a radwindow and is created as a modal window.
Within the aspx page, are the user controls that i am attempting to replace existing with telerik.

When a radwindow is open, do i lose anything that i must declare again?
As expressed it is aware of the script manager. 

What could i be missing? At wits end.

Thank you



1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Apr 2014, 09:27 AM
Hi,

Please have a look into the following forum thread which discuss about the same issue. Please provide a sample code snippet where I can replicate the issue for further help.

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

Thanks,
Princy.
Tags
Button
Asked by
AName
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or