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

2 posts, 0 answers
  1. Sam
    Sam avatar
    2 posts
    Member since:
    Nov 2015

    Posted 11 Nov 2015 Link to this post

    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?

  2. Sam
    Sam avatar
    2 posts
    Member since:
    Nov 2015

    Posted 11 Nov 2015 in reply to Sam Link to this post

    solved by replacing  <%= with <%#   in entire page
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top