1.

How We Can Handle The Exception At Controller Level In Mvc?

Answer»

Exception HANDLING is made SIMPLE in MVC and it can be done by just overriding “OnException” and set the result property of the filtercontext object (as SHOWN below) to the view detail, which is to be returned in case of exception.

protected OVERRIDES VOID OnException(ExceptionContext filterContext)

{

}

Exception Handling is made simple in MVC and it can be done by just overriding “OnException” and set the result property of the filtercontext object (as shown below) to the view detail, which is to be returned in case of exception.

protected overrides void OnException(ExceptionContext filterContext)

{

}



Discussion

No Comment Found