Issue while using Javascript

3 posts, 1 answers
  1. Akhtar
    Akhtar avatar
    5 posts
    Member since:
    Mar 2016

    Posted 28 Mar 2016 Link to this post

    Hi i am Akhtar Abbas i am using telerik controls in my ASP.NET web application. I am currently designig a login page i am using RadStyleSheetManager, RadAjaxManager, RadAjaxLoadingPanel and RadCodeBlock. the HTML for the page is below

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="AccessCenter.Login" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

    <!DOCTYPE html>

    <html xmlns="">
    <head runat="server">
        <meta charset="utf-8">

        <title>Log In</title>
        <link href=',700' rel='stylesheet' type='text/css'>
          <link rel="stylesheet" href="//">
        <div class="wrapper">
            <div class="back1">

                <p class="title">Evac</p>
                <form runat="server" id="form1" class="login">
                    <asp:ScriptManager runat="server" ID="smLogin"></asp:ScriptManager>
                    <telerik:RadStyleSheetManager runat="server">
                            <telerik:StyleSheetReference Path="css/normalize.css" />
                            <telerik:StyleSheetReference Path="css/login.css" />

                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                            <telerik:AjaxSetting AjaxControlID="btnLogin">
                                    <telerik:AjaxUpdatedControl ControlID="form1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                                    <telerik:AjaxUpdatedControl ControlID="txtUserName"></telerik:AjaxUpdatedControl>
                                    <telerik:AjaxUpdatedControl ControlID="txtPassword"></telerik:AjaxUpdatedControl>

                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">

                    <asp:TextBox runat="server" ID="txtUserName" placeholder="Username" autofocus></asp:TextBox>

                    <asp:TextBox runat="server" ID="txtPassword" placeholder="Password"></asp:TextBox>

                    <asp:TextBox runat="server" ID="txtCaptcha" CssClass="captcha-fld"></asp:TextBox>

                    <asp:TextBox runat="server" ID="txtCaptchaText" CssClass="captcha-fld-type"></asp:TextBox>

                        <i class="spinner"></i>
                        <asp:Button runat="server" ID="btnLogin" CssClass="login-submit" OnClick="btnLogin_Click" />
                    <asp:Label ID="lblError" runat="server" ForeColor="Red" Visible="false"></asp:Label>
                    <a href="#">Forgot your password?</a>
                    <a class="right2" href="#">Sign Up</a>
                    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                        <script src="js/index.js" type="text/javascript"></script>
        <script src=''></script>

    I also have added settings in web.config.

        <add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
        <add key="Telerik.Web.UI.StyleSheetFolders" value="~/css" />
          <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
        <validation validateIntegratedModeConfiguration="false"/>
          <remove name="ApplicationInsightsWebTracking"/>
          <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler"/>
          <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler"/>
          <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler"/>
          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>

    when i load my page then i have got the following error on the page

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

    How to resolve this?
    Note: These controls are purchased controls
    I neet urgent responce please reply me as fast as possible because i have deadline of the project
  2. Answer
    Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 31 Mar 2016 Link to this post


    Note that adding the form element into Ajax setting is not a valid scenario. Therefore please add the inner form controls in the Ajax settings separately but not the whole form and see how it goes.

    Also please avoid opening duplicate tickets for the same issue so that we can easily track your case and provide the best solution for your issue. In case further assistance is needed I would suggest you to reply in the initial ticket you have opened for this issue ( Ticket ID: 1022291).

    Maria Ilieva
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. Akhtar
    Akhtar avatar
    5 posts
    Member since:
    Mar 2016

    Posted 31 Mar 2016 in reply to Maria Ilieva Link to this post

    Thanks Maria Illivia

    You have resolved my issue

Back to Top