2

I am working on ASP.NET MVC.

in order to use AjaxHelper, I inserted two javascript files in the site.master as following.

<script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>

then I used AjaxHelper in view pages, but it did not work.

so, I changed order of javascript file as following.

<script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>

Then it worked :(

So, my question is that the order of JavaScript file effects to use AjaxHelper class?

tereško
  • 58,060
  • 25
  • 98
  • 150
Kwon
  • 71
  • 2
  • 8

2 Answers2

3

Absolutely. The MVCAjax classes will need to reference the more generic Ajax classes. Therefore, the generic ones get referenced first

Jeff.Crossett
  • 315
  • 1
  • 10
0

The MicrosoftMvcAjax.debug.jss file has code in it that references code in MicrosoftAjax.debug.js. Hence the order in which they are declared matters.

Haacked
  • 58,045
  • 14
  • 90
  • 114