Donate

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.
 <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> 
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

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

Remove Cookies From CookieContainer Class

How To Test Or Check Dead Pixels And Backlight Bleed On Your Monitor Using Dead Pixel Checker In Windows 11