Handle Exception Using Exception Filter ASP.NET MVC 5

 using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;


namespace WebApplication31.Filter

 public class NitishException : FilterAttribute, IExceptionFilter

 

public void OnException(ExceptionContext filterContext)


filterContext.Result = new ViewResult()

{


ViewName = "Error"

};

}

}













Comments

Popular posts from this blog

Uploading Image to Sql Server Image Datatype in asp.net using fileupload Control

Get Running Sum of Query SQL Query