top button
Flag Notify
Site Registration

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

0 votes
243 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

Your answer

Preview

Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...