Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda