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

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

1 Answer 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 11 Nov 2015, 10:35 AM

Hi I am not able to solve this error The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

 

this is my script

 

<body>
 

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager2" runat="server" />
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager EnableAJAX="true" ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="FormView1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="FormView1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>


     <telerik:RadScriptBlock  ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            var FormName = "frmPerformMaintRecurringAS";
            var FormId = 71;
            var UserId = '<%= Session["UserId"] %>';
            EntityID = FormId;
            var tabstrip;
        </script>
    </telerik:RadScriptBlock>​

 

 

what am doing wrong?

1 Answer, 1 is accepted

Sort by
0
Sam
Top achievements
Rank 1
answered on 11 Nov 2015, 11:03 AM
solved by replacing  <%= with <%#   in entire page
Tags
General Discussions
Asked by
Sam
Top achievements
Rank 1
Answers by
Sam
Top achievements
Rank 1
Share this question
or