ASP.NET MVC AJAX Sys is undefined error ASP.NET MVC AJAX Sys is undefined error asp.net asp.net

ASP.NET MVC AJAX Sys is undefined error


In web.config add the following line of code under appsettings tag:

<add key="UnobtrusiveJavaScriptEnabled" value="true" />


Just in case... use the following to avoid path issues

<script src="<%= Url.Content("~/Scripts/MicrosoftAjax.debug.js") %>"     type="text/javascript"></script>  <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.debug.js") %>"     type="text/javascript"></script>

Source: http://msdn.microsoft.com/en-us/library/dd381533.aspx

Thanks,Arty


Load the page in Firefox, then use Firebug to inspect the page - you will be able to see all the individual scripts that have been loaded, plus all the network requests that were issued, and whether they succeeded or not. This is better than trying to troubleshoot from the server perspective.

If you are using IE8, you can use the Developer Tools window, but I think Firebug is better - both tools support JavaScript debugging though.

The most likely problem is that you are running script in your partial view before the scripts it is dependent on have had a chance to load - make sure that any script calls you have inside your partial view will only run once the page has loaded, and not immediately during loading.