- What is Controller in ASP.NET CORE 1.0 MVC 6?
- How to Add a Controller?
- How to Pass Controller Data to View?
What is Controller?
Controller is the main pillar of MVC architecture. It is the area where you write all your programming logic. Controller receives browsers request fetch data from Model Applies your logics Fill data in View and Return to browsers. In MVC, View only displays information and behind ViewPage there is always an
action method in controller that handles the entire request and provides output for ViewPage. In a Single line, Controller controls everything in ASP.NET Core MVC.
In the previous chapter you learned How to Add a View Page and in this chapter, you will learn how to add a controller in the MVC app and work with users data. In this tutorial, I am not going to work with the database because the next chapter is Adding a Model where I will discuss database. Just make the focus on passing data between View Page and Controller.
List of Contents
- How to Add a Controller
- Get Integer Input and Add Two Numbers in ASP.NET Core
- Multiple Submit Button in a Single Form – ASP.NET CORE
In this chapter you just get the only preview of Controller in ASP.Net Core. In the next few chapters, you will learn how to program in the controller to achieve the desired result. The next chapter is How to Add a Controller with step by step guide and complete programming examples.