In this tutorial you will learn:
- 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 database because the next chapter is Adding a Model where I will discuss about database. Just make focus on passing data between View Page and Controller.
List of Contents
- How to Add a Controller
- Display Message in View Page
- Add Two Numbers and Display on Page.
- Implement Form in ASP.NET Core
- Multiple Submit Button in a Single Form
- Send and Receive Value using Query String
In this chapter you just get only preview of Controller in ASP.Net Core. In the next few chapters you will learn how to program in controller to achieve desired result. The next chapter is How to Add a Controller with step by step guide and complete programming examples.