Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created an n tier architechture in mvc.
API
Models
Modules
Web(MVC)
I developed a project with separate layers. 
I used Web-API to  show how to expose a BLL method as API and called it from UI layer. I executed  a SP in DAL .


I want to use
Exception-handling across each layer and bubbling the message up the layers all the way to UI and displaying it using JQuery error handler.


What I have tried:

I do not find a good solution to implement jquery.

$(document).ready(function () {
        $('test').click(function () {
            $.ajax({
                url:"http://localhost:53945/api/CollegeDetails/GetCollegeList",
                type: "GET",
                error: function (response) {

                },
                success: function (response) {

                }
            });
        })
    }
Posted
Comments
ZurdoDev 14-Nov-17 11:43am    
Any error that you throw will come back and fire the error function in your .ajax call.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900