radchart error

Thread is closed for posting
2 posts, 0 answers
  1. richard
    richard avatar
    48 posts
    Member since:
    Dec 2010

    Posted 05 Jul 2013 Link to this post

    I am getting this error below. I am using NO javascript or <%..%> code whatsoever. I have tried placing radcodeblock on the page around the <form></form> tags in case radchart is using javascript.

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

    (i.e. <% ... %>).


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DashBoard.aspx.cs" Inherits="YS.View.DashBoard.DashBoard" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %>
    <%@ Register Assembly="Telerik.OpenAccess.Web.40" Namespace="Telerik.OpenAccess.Web"
      TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head>
      <link href="../../Styles/Site.css" rel="stylesheet" type="text/css" />
      <title></title>
    </head>
    <body>
      <telerik:RadScriptManager ID="RadScriptManager" runat="server">
      </telerik:RadScriptManager>
      <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
      </telerik:RadWindowManager>
      <telerik:RadAjaxPanel runat="server" ID="rapGrid" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
          <form id="form1" runat="server">
          <div>
            <div class="quota">
              <asp:Label ID="lblSales" runat="server">Sales Quota</asp:Label>
              <telerik:RadRadialGauge ID="quotaGauge" runat="server" BorderStyle="None" Height="220px"
                Width="220px">
                <Pointer Value="83">
                </Pointer>
                <Scale Min="0" Max="100" MajorUnit="20" MinorUnit="2">
                  <Labels Format="{0}%" Position="Inside" />
                  <Ranges>
                    <telerik:GaugeRange Color="Red" From="0" To="30" />
                    <telerik:GaugeRange Color="Orange" From="30" To="70" />
                    <telerik:GaugeRange Color="Green" From="70" To="100" />
                  </Ranges>
                </Scale>
              </telerik:RadRadialGauge>
            </div>
            <h1>
              <asp:Label ID="Label1" Text="Message Center" runat="server"></asp:Label><telerik:RadDatePicker
                ID="rdpMessageDate" runat="server" OnSelectedDateChanged="rdpMessageDate_SelectedDateChanged">
              </telerik:RadDatePicker>
              <h1>
              </h1>
              <telerik:RadGrid ID="rgMessages" runat="server" CellSpacing="0" GridLines="None"
                OnNeedDataSource="rgMessages_NeedDataSource" Width="350px">
                <MasterTableView AutoGenerateColumns="False">
                  <CommandItemSettings ExportToPdfText="Export to PDF" />
                  <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                    <HeaderStyle Width="20px" />
                  </RowIndicatorColumn>
                  <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                    <HeaderStyle Width="20px" />
                  </ExpandCollapseColumn>
                  <Columns>
                    <telerik:GridDateTimeColumn DataField="date" DataFormatString="{0:dd/MM/yyyy}" FilterControlAltText="Filter date column"
                      HeaderText="Date" UniqueName="date">
                      <ItemStyle Width="50px" />
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="message" FilterControlAltText="messages" HeaderText="Message"
                      UniqueName="message">
                    </telerik:GridBoundColumn>
                  </Columns>
                  <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                  </EditFormSettings>
                  <PagerStyle PageSizeControlType="RadComboBox" />
                </MasterTableView>
                <PagerStyle PageSizeControlType="RadComboBox" />
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
              </telerik:RadGrid>
              <div>
                <asp:Label ID="lblDate" runat="server">Sales To Date</asp:Label>
                <telerik:RadChart ID="rcSales" runat="server" Width="800px">
                </telerik:RadChart>
                <br />
              </div>
            </h1>
          </div>
          </form>
        </telerik:RadCodeBlock>
      </telerik:RadAjaxPanel>
      <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
      </telerik:RadAjaxLoadingPanel>
    </body>
    </html>

    As i said I am NOT using anything like that. I didnt start getting the error until I placed a RadChart on the page.

    any thoughts?

    Thanks,
    Richard
  2. richard
    richard avatar
    48 posts
    Member since:
    Dec 2010

    Posted 05 Jul 2013 Link to this post

    i got it solved. needed to move the radajaxpanel into the <form>
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top