Question: I created a new ASP.Net MVC 4 project using the template in Visual Studio 2012. After upgrading to jQuery 1.9, the login functionality breaks. Specifically, I get the error

> 
> 0x800a138f - JavaScript runtime error: Unable to get property 'call' of undefined or null reference
> 
> 
> 

at line 1172, column 5 in jquery.validate.js

How can I fix this issue?

Answer: 
The issue is the line of code inside of the validation script

```
$.event.handle.call(this,e);

```

The problem here is with `$.event.handle`. Both `this` and `e` have proper values. jQuery deprecated $.event.handle in favor of jQuery.event.dispatch according to the migration script <http://code.jquery.com/jquery-migrate-1.2.0.js>.

Fixing these errors is as easy as simply replacing the reference to handle with dispatch.

This can be wrapped in a document.ready callback to ensure it runs after the other scripts run.

```
$(function(){
    jQuery.event.handle = jQuery.event.dispatch
});

```
Replacing the bundles script path by the following line worked for me.

```
 <script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/bundles/jqueryval")"></script>

```

I tried updating the jquery validation via Nuget, and also updated the jquery to 2.0 version, but none of those solution worked. The only one that worked fine without downloading anything Pre version was the solution proposed by Texellab