Hello,
I have Ajax.BeginForm with OnSuccess & OnFailure javascript handlers.
How do fail from my controller so that OnFailure is called?
Yes, I used to call throw new HttpException(404) and it used to work.
But now, I have set a custom error handler that calls Server.ClearError(). Due to this Ajax.BeginForm thinks that no error has occurred.
I am using the error handler given here: http://stackoverflow.com/questions/1171035/asp-net-mvc-custom-error-handling-application-error-global-asax