I am building a simple example with ASP.NET MVC5. We can build various kinds of Web applications using ASP.NET MVC 5.
Today, I will share how to build a simple Web application project using ASP.NET MVC 5, with Visual Studio 2019.
Everyone can download it here.
Installing notes - When installing, make sure to open the Individual Components tab, and choose Class Designer and LINQ to SQL Tools.
Setup project ASP.NET MVC 5
You choose ASP.NET Web Application. Next, you will choose the framework version.
After creating the project, add new HomeControler.cs file in the Controllers directory.



Ok, now create the layout of the project.
- Create Shared folder in directory Views
- Create _LayoutPage1.cshtml file in Views/Shared directory

You've created the layout successfully!
Next open HomeController.cs, click-right function index()-> choose Add View.


You have a new Index.cshtml file in Views/Home/Index.cshtml directory.
Continue!
Open Controllers/HomeController.cs and configuration function index() using the folllowing below code:

Join the conversation! Your thoughts help the community grow.