Click here to Skip to main content
13,704,436 members
Click here to Skip to main content
Add your own
alternative version


12 bookmarked
Posted 21 Oct 2012
Licenced CPOL

Modular Structure in ASP.NET MVC Application

, 21 Oct 2012
Rate this:
Please Sign up or sign in to vote.
Areas gives the opportunity to separate a large ASP.NET MVC Web application into smaller functional groups or loosely coupled modules.


Functionally independent modules can be accumulated in ‘Areas’ for ASP.NET MVC application. This approach is helpful for each module to develop separately and independently. An area is effectively an MVC structure inside an application. An application could contain several MVC structures (areas).

Steps to Create ‘Areas’

  1. Create MVC 4 empty application.
  2. Right-click on the project and select Add -> Area… option. 
  3. Write a name for ‘Areas’. Example: Module1.

    In this way, it is possible to add/create several Areas. Notice that the area registration class file (Module1AreaRegistration.cs) will be created under the Module1 folder. This .cs class inherits the AreaRegistration base class.

  4. At the RouteConfig.cs class in ‘App_Start’ folder, add the following start-up Controller Builder.;

Solution Structure

If anyone gets the following error message, "Compiler Error Message: CS0234: The type or namespace name Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)" 

Install the latest System.Web.Optimization package. To install the package, use Package Manager Console (Tools -> Library Package Manager -> Package Manager Console) and execute the command below: 

Install-Package -IncludePrerelease Microsoft.AspNet.Web.Optimization


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

MD. Ashrafuzzaman Emon
Software Developer (Senior)
Bangladesh Bangladesh
To be a results-driven, customer-focused, articulate and analytical Software Engineer by gaining experiences in the real life situation using my abilities and knowledge of IT as well.

You may also be interested in...


Comments and Discussions

QuestionLink Broken Pin
Member 121907276-Dec-15 22:35
memberMember 121907276-Dec-15 22:35 
QuestionSource code file missing Pin
Tridip Bhattacharjee14-May-14 21:42
memberTridip Bhattacharjee14-May-14 21:42 
GeneralMy vote of 3 Pin
dzmuh1-Nov-12 15:30
memberdzmuh1-Nov-12 15:30 
QuestionModular structure in ASP.NET MVC Pin
akhter90023-Oct-12 5:32
memberakhter90023-Oct-12 5:32 
GeneralMy vote of 5 Pin
Savalia Manoj M22-Oct-12 20:53
memberSavalia Manoj M22-Oct-12 20:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web05-2016 | 2.8.180920.1 | Last Updated 21 Oct 2012
Article Copyright 2012 by MD. Ashrafuzzaman Emon
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid