Free Web Development Online Tutorials, Learn to Code
How to add new Area in MVC, Add new functional area in application

Areas in MVC Application

In this tutorial you will learn how to use Area in MVC Application, how to add new area in mvc application!

What is an Area in Asp.Net MVC?

An area in MVC is a kind of container / folder / section, in big size MVC application we can have multiple subsection or functional area, each Area has its own Controllers, Models, Views, completely independent section but united under same assembly.

Why do we need an Area in Asp.Net MVC?

Think of any big size organization which has multiple operational wing, which are very different from each other, Let’s take an example of an FMCG company, which has it Purchase, Sale, Marketing, HR , Account and Operation section, though all are interlinked but they are completely different in terms of their day to day operation.

You may say, in that cases why not build each application separately! Well, if they build separate application then maintenance and deployment cost may be ten times more than maintaining one single umbrella, in such cases we need to come up with this Area concept, which are logically and physically completely separate, clean and easy to maintain and deploy. Areas Characteristics

  • In a MVC application we can have any number of Areas
  • Each Area has its own controllers, models, and views.
  • Areas are very useful in managing big size application, easy to maintain
  • For each Area, there is a separate folder cerated.
  • Multiple business team can work on same project using area

How to create an Area in Asp.Net MVC?
Right click on your web project and add a new Area, as shown below.

how to create area in mvc

Your new Area is ready, now simply create a folder under View called “Home” and a “Home” controller under controller folder.

Then you should be able to access your new area with

Incase you get an error saying "Multiple types were found that match the controller named 'Home'",here is the solution

Asp.Net MVC C# Examples | Join Asp.Net MVC Course | Core Tutorial