top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How we can handle the exception at controller level in ASP.Net MVC?

0 votes
325 views
How we can handle the exception at controller level in ASP.Net MVC?
posted Aug 27, 2016 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Exception Handling is made simple in ASP.Net 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)
    {
    }
answer Aug 29, 2016 by Shivaranjini
...