My javascript file references MicrosoftAjax.js to register the namespace and classes using registerNamespace and registerClass functions like this :
//Registering the namespace 'Root' using MS Ajax Framework
if (typeof (Root) == 'undefined') {
Type.registerNamespace('Root');
}
The Root namespace is referenced at multiple places in the javascript file like :
Root.__ServiceInstances = new Object();
Root.StringDictionary = function() {
this._arrDictionary = new Object();
}
Root.StringDictionary.registerClass('Root.StringDictionary', null);
Root.KeyedItemDictionary = function() {
this._arrDictionary = new Object();
}
//Registering the class
Root.KeyedItemDictionary.registerClass('Root.KeyedItemDictionary', null);
I do not want to use Ajax longer in my project. When I removed the reference to MicrosoftAjjax.js from my javascript file, I recieved 'Type is not defined' error.
Is there any workaround I can do in javascript file itself to register the namespaces and classes without Microsoft Ajax framework.
Please know that I am primarily a .NET dev and a beginner in javascript. Thanks in advance
Well, one would assume that you added the ajaxtoolkit via nuget. So, should one then now remove the nuget package from the project?
Of course any page that you tested or adopted a extender or aj control, then at the top of that page, you see this:
<%@ Register assembly="AjaxControlToolkit"
namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
So, removing the above from the given pages (and any aj control or extender tags) should thus result in the aj toolkit having been removed.