How to Implement jQuery Ajax Error handling in ASP.NET MVC Project Chintan Prajapati October 3, 2016 2 min read This article is for solving a problem of jQuery Ajax error facing in Asp.Net MVC projects.The problem with Ajax Errors:During asp.net programming, We have plenty of Ajax methods in our asp.net MVC project. The problem is that some methods were broken. so that, we did not get exactly in which methods the issue arose from. this is actually because of the jQuery Ajax error.The solution for Ajax Errors:We can solve issues in two ways: Handling errors for individual methods. Handling errors using a single(Global) method.If we handle errors for individual methods. it will take lots of effort for us to put error handling code in individual methods. Another approach for handle code using the global method.Examples: Handling errors using a single(Global) method: $(document).ajaxError(function(event, jqxhr, settings, thrownError) { if (settings.url == "ajax/missing.html") { $("div.log").text("Triggered ajaxError handler."); } });Parameters:settings: settings object that was used in the creation of the request information such as settings.url. thrown Error: receives the textual portion of the HTTP status, such as “Not Found” or “Internal Server Error.” Handling error for individual methods: $.ajax({ type: "POST", url: "some/url", success: function(data, status, xhr) { // handle success }, error: function(xhr, status, error) { // handle error } });Conclusion:We can handle ajax error two ways one for an individual method. one for using a single global method so it is good practice if we handle ajax.error method globally rather than doing code for the individual method. There are many global Ajax methods such as follow: .ajaxComplete() .ajaxError() .ajaxSend() .ajaxStart() .ajaxStop() .ajaxSuccess()Reference Links:Please check the below link For reference, see how it is written:ajaxError eventKindly visit our latest articles related to Asp.net MVC using c# programming and much more.Thanks…!!