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

Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDe

0 Answers 191 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Devang
Top achievements
Rank 1
Devang asked on 06 Jul 2017, 09:01 PM

Hello Friends,

   I am getting same old "Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl " as soon as I write following code to enable ajax for the radgrid. 

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgUploadedDocs">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUploadedDocs" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

 

I am not doing anything special here. All I have is main aspx page with master page and few user controls in it. One of the user controls is already having RadAjaxManager so I am using RajAjaxManagerProxy in my user control. Following is my full aspx page code. I would appreciate if someone can help me on this. 

 

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UploadDocument.ascx.cs" Inherits="UserControls_UploadDocument" %>
<%@ Register Src="~/UserControls/FormField.ascx" TagName="FormField" TagPrefix="uc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
 
 
<span id="uploadMessage" runat="server"  visible="true" class="formLabelAuto">The documents shown below are uploaded from this page only. You have to navigate to the specific page to view the documents on that page.</span>
<br />
<br />
 
 
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function showHideOtherText() {
            document.getElementById('<%= txtDescription.ClientID %>').value = '';
        var selectElem = document.getElementById('<%= ddlUploadDocumentType.ClientID %>');
        var selectText = selectElem.options[selectElem.selectedIndex].text;
 
        if (selectText.toUpperCase() == 'OTHER') {
            document.getElementById('<%= txtDescription.ClientID %>').removeAttribute('disabled');
        }
        else {
            document.getElementById('<%= txtDescription.ClientID %>').setAttribute('disabled');
        }
 
    }
        </script>
</telerik:RadCodeBlock
 
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgUploadedDocs">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUploadedDocs" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
 
<div style="text-align:center">
        
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="50"
        BackColor="#E0E0E0" InitialDelayTime="500">
        <asp:Image ID="imgLoading" Style="margin-top: 100px" runat="server" ImageUrl="~/Images/Loading.gif"
            BorderWidth="0px" AlternateText="Loading..." />
    </telerik:RadAjaxLoadingPanel>
 
    <telerik:RadGrid RenderMode="Lightweight" ID="rgUploadedDocs" runat="server" Width="100%" Enabled ="true"
        FilterItemStyle-BackColor="#e6e6e6" FilterItemStyle-BorderStyle="Solid" OnNeedDataSource="rgUploadedDocs_NeedDataSource"
         OnItemDataBound="rgUploadedDocs_ItemDataBound" OnItemCommand="rgUploadedDocs_ItemCommand" CssClass="gridViewSmallFont">
        <HeaderStyle CssClass="gridViewHeader" />
        <PagerStyle Mode="NextPrevAndNumeric" />
        <ItemStyle CssClass="gridViewRow" />
        <AlternatingItemStyle CssClass="gridViewAltRow" />
        <SelectedItemStyle CssClass="gridViewSelected" />
        <MasterTableView AllowSorting="true" PageSize="10" AllowPaging="True" Width="100%" AutoGenerateColumns="false" CommandItemDisplay="None" DataKeyNames="DOCUMENT_ID"
             NoMasterRecordsText="No uploaded documents found." AllowFilteringByColumn="false" AllowMultiColumnSorting="true" ShowHeadersWhenNoRecords="true">
        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" /> 
        <SortExpressions>
          <telerik:GridSortExpression FieldName="LAST_MODIFIED_DATE_TIME" SortOrder="Descending" />
        </SortExpressions>      
        <Columns>
            <telerik:GridTemplateColumn HeaderText="Document Type" SortExpression="Name" AllowFiltering="false">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblDocumentType"></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn
            <telerik:GridBoundColumn  UniqueName="FileName" DataField="FILE_NAME" HeaderText="File Name" AllowFiltering="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UploadDate" DataField="LAST_MODIFIED_DATE_TIME" HeaderText="Upload Date" DataFormatString="{0:d}" AllowFiltering="false">
             
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UserName" DataField="Username" HeaderText="Username" AllowFiltering="false">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Osolete" SortExpression="IS_OBSOLETE" AllowFiltering="false">
                <ItemTemplate>
                    <asp:CheckBox ID="rdchkObsolete" runat="server" ToolTip="Obsolete" AutoPostBack="true" OnCheckedChanged="rdchkObsolete_CheckedChanged"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn
            <telerik:GridTemplateColumn AllowFiltering="false">
                <ItemTemplate>
                    <asp:ImageButton ID="imgView" ImageUrl="~/Images/search.png" runat="server" ToolTip="View" CommandName="Edit" AlternateText="View" />
                </ItemTemplate>
            </telerik:GridTemplateColumn
            <telerik:GridTemplateColumn AllowFiltering="false">
                <ItemTemplate>
                    <asp:ImageButton ID="imgCancel" ImageUrl="~/Images/cancel.png" runat="server" CommandName="Delete" ToolTip="Delete"
                        CommandArgument='<%# DataBinder.Eval(Container.DataItem, "DOCUMENT_ID") %>' AlternateText="Delete" />
                </ItemTemplate>
            </telerik:GridTemplateColumn
        </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
    <br />
    <br />
    <table border="0" style="border-collapse: collapse; border-spacing: 0"  role="presentation">
        <tr>
            <td> </td>
            <td>
                <asp:FileUpload id="filUploadFile" runat="server" Width="400px" size="100" />
            </td>
        </tr>
        <tr><td> </td><td> </td></tr>
         <tr runat="server" id="trUploadDocumentType">
            <td style="text-align:right"><span class="formLabelAuto">Document Type:</span></td>
            <td style="text-align:left"><asp:DropDownList runat="server" ID="ddlUploadDocumentType" CssClass="formField220" OnClientClick="showHideOtherText();"></asp:DropDownList></td>
         </tr>
         
        <tr><td colspan="2"> </td></tr>
        <tr><td colspan="2"><asp:ValidationSummary ID="vsUpdateDocument" runat="server" DisplayMode="SingleParagraph" ValidationGroup="valUpdateDocument" /></td></tr>
         
        <tr style="vertical-align:top">
            <td>
                <span class="formLabelSmall">Description</span>
            </td>
            <td>
                <asp:TextBox ID="txtDescription" runat="server" Rows="5" CssClass="formFieldLarge" TextMode="MultiLine" MaxLength="500" />
            </td>
        </tr>
    </table>
    <br />
    <asp:Button id="UploadButton" Text="Upload file" OnClick="UploadButton_Click" runat="server" CssClass="buttonBox"
        ValidationGroup="valUpdateDocument" /> 
    <p><b><asp:Label ID="lblStatusMsg" runat="server" Width="100%" Style="word-wrap: normal; word-break: break-all;"/></b></p
</div>

No answers yet. Maybe you can help?

Tags
Ajax
Asked by
Devang
Top achievements
Rank 1
Share this question
or