Tuesday, January 5, 2010

Error: 'b' is null or not an object, MicrosoftAjax.js error

There is an error when using MicrosoftAjax.js library for MVC 2.0.

When using the Ajax helper, Ajax.BeginForm, you can specify a OnSuccess javascript function.

This needs to be used as a callback, meaning that you cannot put ().

So...
OnSuccess="MyFunc()" // error needs to be...
OnSuccess="MyFunc"

No comments:

Post a Comment