1

I have a WebForms app that I'm converting to MVC, but for now running legacy stuff side-by-side.

For some reason, the ScriptManager left to it's own devices tries to load the following files from a very strange (and non-existent) location:

<script src="Scripts/WebForms/MsAjax/MicrosoftAjax.js" type="text/javascript"></script>
...
<script src="Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js" type="text/javascript"></script> 

I can't find the setting of that location, and googling "Scripts/WebForms/MsAjax" brings back nothing.

Changing the (obsolete) ScriptPath property on the ScriptManager does nothing to help with these two scripts.

Trying to override the Path location like the following also does not work (it just tries to load both scripts)

Scripts.Add(new ScriptReference { Name = "MicrosoftAjax.js", Path = ContextUtil.MapApplicationPath("~/My/Script/Location/MicrosoftAjax.4.0.js") });
Scripts.Add(new ScriptReference { Name = "MicrosoftAjaxWebForms.js", Path = ContextUtil.MapApplicationPath("~/Shared/Scripts/Legacy/MicrosoftAjax/MicrosoftAjaxWebForms.4.0.js") });

What I can't understand is

  1. Why is it not loading the scripts by default from a Embedded Resource?
  2. Where is this strange path coming from?
  3. Why won't it accept my overridden script paths?

Can anyone help?

Chris Haines
  • 6,445
  • 5
  • 49
  • 62

0 Answers0