In this tutorial you will learn how to use Area in Asp.net MVC Application, how to add new area in asp.net mvc application!
An area in asp.net MVC is a kind of container / folder / section, in big size asp.net MVC application we can have multiple Subsection or Area, each Area has its own Controllers, Models, Views, completely independent section but united under same assembly.
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.Characteristics of Areas in Asp.net MVC
How to create an Area in Asp.Net MVC?
Right click on your web project and add a new Area, as shown below.
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 www.yourwebsite.com/areaName/home
Incase you get an error saying "Multiple types were found that match the controller named 'Home'",here is the solution