Best Practices for MVC, jQuery and Handling Errors?

The AJAX call is not a page refresh so I would definitely not redirect to a 403, 404 etc. I would display a client side dialog explaining the unexpected result of the request appropriately. Your controller can return the results of failed validation to the AJAX call in a similar fashion to how it would return success data so your dialog can also display whatever is required in this scenario.

Yes, yes I do. We also worked through a similar problem--we wanted the app to have a bunch of forms which would be called generally via ajax but could get hit normally. Moreover, we didn't want a whole bunch of duplicate logic in javascript floating around.

Anyhow, the technique we came up with was to use a pair of ActionFilterAttributes to intercept the forms, then a little javascript to wire up the form for ajax handling.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions