ASP.NET error with Assembly
Solution 1
I had the same error message while ago and it was caused due to missing ScriptManager. Try to add ScriptManager to your aspx page.
<asp:ScriptManager runat="server"></asp:ScriptManager>
Or you can add ScriptManager dynamically at Page_Load event of code behind.
if (ScriptManager.GetCurrent(Page) == null)
{
Page.Form.Controls.AddAt(0, new ScriptManager());
}
If you want to learn why we need ScriptManager when ASP.NET AJAX ToolKit is used you can check here.
Solution 2
Where did you get the Ajax toolkit assembly? Wasn't there any resource files with it (language resources etc.)? I have had this problem before when adding a reference to the assembly from a location where such resources were not present.
Upon removing, and adding from the originating location (where the resource files reside alongside) then the required files are also added to the references folder. All of these resources being added are a bit of a pain, actually (since they insist on expanding over an over!), if you're not using them, but I haven't found a way to 'turn off' this behaviour yet.
As a side note, you can place the following line within the <pages><controls>
element of your web.config to enable access to the toolkit controls through the specified TagPrefix
throughout your pages:
<add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagPrefix="Ajax"/>
Solution 3
Add to form:
<asp:ScriptManager ID="ScriptManager1" runat="server" />
or
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
Solution 4
You may need to add the ToolkitScriptManager and not the ScriptManager
- You must use the ToolkitScriptManager instead of the ScriptManager with the Ajax Control Toolkit.
It's written in the notes in the following link:
https://ajaxcontroltoolkit.codeplex.com/releases/view/116091
Related videos on Youtube
Y2theZ
Updated on July 09, 2022Comments
-
Y2theZ almost 2 years
Hello I am creating an ASP.NET/C# website and I want to use the Ajax Toolkit assembly. I added it to the "References".
In Default.aspx I have this:
<%@ Page Title="My_Website" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" ViewStateMode="Enabled" CodeBehind="Default.aspx.cs" Inherits="My-Website._Default" %> <%@ Register TagPrefix="ajaxToolkit" Namespace="AjaxControlToolkit" Assembly= "AjaxControlToolkit"%> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <ajaxToolkit:ComboBox ID="ComboBox1" runat="server" /> </asp:Content>
In the Design Tab I can see the Combo box and everything is fine. But when I try to debug the application I get this error:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.NET4.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.
-
Cᴏʀʏ over 12 yearsHave you put a
<ajaxToolkit:ToolkitScriptManager ID="something" runat="server" />
on the page yet? It will come with the resources you appear to be missing.
-
-
Cᴏʀʏ over 12 yearsI'm not sure why this was downvoted -- there are several blog entries around the web describing the OP's problem exactly, with the solution being to remember to include a ToolkitScriptManager on the page.
-
emre nevayeshirazi over 12 yearsI also don't know why it was downvoted. I had same problem while ago and this solved my problem.
-
Admin over 11 yearsStackOverflow, you never cease to amaze me. This forum just solved my problem exactly! Thanks!