Friday, 15 June 2012

jquery - Responding to an AJAX call with only Success or Failure? -


I have a MVC Ajax form, and I'm just using it to fulfill some basic tasks.

I am coding in C #, HTML, Razor and jQuery.

What I want to do is react with one of two possibilities, success or failures.

How can I respond to AJAX calls to specify either success or failure? Status code?

Thanks in advance.

I just json {"success": true} or {"Success": wrong} return.

It is simple and it should work.

No comments:

Post a Comment