0

I am developing a Web Application using WebForms with ASP.NET. Using a ScriptManager, I am loading a custom javascript script file.

When I view the page in browser, I do not get the intended action (display a timer) and "view source" on the page gives me the following error message:

//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>

In my attempts to troubleshoot, I have used the same javascript file in an ASP.NET Website and it works fine. It only seems to happen with a Web Application. I've also added an alert into my javascript file, which works fine on both Website and Web Application.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Vim
  • 365
  • 1
  • 4
  • 6

1 Answers1

0

There are two possible reasons for this error.

First is that you do not have include the ScriptManager, but because as you say you have included it, the second reason is that you need to move the ScriptManager before the call of the "sys" so can be found by the rest script that throw this error.

So move the ScriptManager upper, or move your script lower than ScriptManager.

Aristos
  • 66,005
  • 16
  • 114
  • 150