Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
Type is not defined error seen in javascript when ajax toolkit is removed

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

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

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.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda