The type or namespace name 'ToolkitScriptManager' does not exist in the namespace 'AjaxControlToolkit'

3.4k views Asked by At
 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.aspx.cs" Inherits="Test.FileUpload" %>
 <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>


<div>
        <ajaxToolkit:ToolkitScriptManager id="scriptManager1" runat="server" />

        <div>
            <ajaxToolkit:AsyncFileUpload runat="server" id="fileUpload1" onclientuploadcomplete="uploadComplete" onclientuploaderror="uploadError"
                completebackcolor="White" width="350px" uploaderstyle="Modern" uploadingbackcolor="#CCFFFF"
                throbberid="imgLoad" onuploadedcomplete="fileUploadComplete"></ajaxToolkit:AsyncFileUpload>
            <br />
            <asp:Image ID="imgLoad" runat="server" ImageUrl="loading.gif" />
            <br />
            <asp:Label ID="lblMsg" runat="server" Text=""></asp:Label>
        </div>
     </div> 

I have installed AjaxControlToolKit, added a reference to it, added these controls to Toolbox. ajaxToolkit:AsyncFileUpload is recognisable. But, I am getting "The type or namespace name 'ToolkitScriptManager' does not exist in the namespace 'AjaxControlToolkit' (are you missing an assembly reference?)" for ajaxToolkit:ToolkitScriptManager.

How to resolve it?

1

There are 1 answers

0
Hiral Nayak On

you add ScriptManager AS

    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <ajaxtoolkit:AsyncFileUpload runat="server" ID="fileUpload1" OnClientUploadComplete="uploadComplete"
                OnClientUploadError="uploadError" CompleteBackColor="White" Width="350px" UploaderStyle="Modern"
                UploadingBackColor="#CCFFFF" ThrobberID="imgLoad" OnUploadedComplete="fileUploadComplete">
            </ajaxtoolkit:AsyncFileUpload>
            <br />
            <asp:Image ID="imgLoad" runat="server" ImageUrl="loading.gif" />
            <br />
            <asp:Label ID="lblMsg" runat="server" Text=""></asp:Label>
        </div>
    </div>