When we create a new MVC project then Model, View and Controller folders are created automatically.This structure is common for simple applications, but when your application grows and becomes complex then the single Model, View and Controller can become complicated. So we can maintain a complex MVC application using areas. Using areas, we can write more maintainable code for an application cleanly separated by the modules.So first create a new MVC empty project.Then right-click on Solution Explorer and click on add and select area.Provide a name.Now add a second Employee area. In your Solution Explorer show your Model, View and Controller in a different student and employee area.Now add a Home Controller and in the Index action add an Index View for both the student and employee area.Now run the project. (Ctrl+F5).For the Teacher area the follwing is the URL localhost/Teachers/Home/Index.Here Teachers is the area name, Home is the controller and Index is the Action name.For the Teacher area the follwing is the URL localhost/Students/Home/Index.Here Students is the area name, Home is the controller and Index is the Action name.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: