Unobtrusive AJAX error: "Uncaught ReferenceError: Sys is not defined" Unobtrusive AJAX error: "Uncaught ReferenceError: Sys is not defined" ajax ajax

Unobtrusive AJAX error: "Uncaught ReferenceError: Sys is not defined"


The html your generating for the link is generated if unobtrusive javascript has been disabled. You can enable it in the view with

@{HtmlHelper.UnobtrusiveJavaScriptEnabled = true;}

or for the application (in web.config) with

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

Your rendered html should then look like

<a data-ajax="true" data-ajax-mode="replace" data-ajax-update="#contentShouldLoadHere" href="/Test/Partial1">Partial 1</a>

and will work with the jquery.unobtrusive-ajax.js file