I want to call \"OnFailure\" when ModelState is not valid in controller.
In My LoginView
@using (Ajax.BeginForm(\"Login\", new AjaxOptions { HttpMethod
When you detect the problem in the ModelState, set the StatusCode of the response object to something like 400 (You can get the code from the System.Net.HttpStatusCode class)
That will fire the onfailure method.
Si