ASP.NET MVC AJAX Sys is undefined error (ASP.NET MVC 2.0 Remote Validation)
Referencing a remote validation can be a pain in the arse since several javascript errors will pop up such as stated in the title. So, in order to remove those unwanted script errors in ASP.NET MVC 2.0, use the solution below.
Note: RemoteValidationScript.js is an external Validation javascript file. The referencing of scripts should be in order to avoid null or property not found javascript exceptions(RemoteValidationScript should be referenced last). You may also use (../../Scripts/MicrosoftAjax.debug.js) for long method.
Reference: Sys is undefined error
Cheers!
Greg
<script src="<%= Url.Content("~/Scripts/MicrosoftAjax.debug.js") %>" type="text/javascript"></script> <script src="<%= Url.Content("~/Scripts/MicrosoftMvcValidation.debug.js") %>" type="text/javascript"></script> <script src="../../Scripts/RemoteValidationScript.js" type="text/javascript"></script>
Reference: Sys is undefined error
Cheers!
Greg
Comments
Post a Comment