views:

239

answers:

3

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?

Thanks in advance.

+3  A: 

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

Jeff.Crossett
A: 

Thanks, Jeff

Kwon
A: 

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