Saturday, November 3, 2018

Asp.net MVC Tutorials About Controllers

Asp.net MVC Tutorials About Controllers. Controllers are the center point of all the data flow in the application. It takes the input HTTP request and rendering the exact output. So controllers are controlling all the flow. Whenever a new request comes from the browser then the controller takes the request and process the which Model will be taken, and then it takes the data from the model to the respective view.

Points To Remember
  • Controllers are the Classes derived from System.Web.Mvc.Controller.
  • Controllers contain public methods. These methods are called Action Methods.
  • The class name must end with Controller like  TestController
  • All Controller Classes are available in the Controller Folder Structure.
Steps To Create Controller 

Step 1 
               Open the Visual Studio and click on File Tab --> New --> Project Menu

           
Asp.net MVC Controllers
 Step 2
               Select Web from left pan next select asp.net web application and give the proper Name,     Location, and Solution at below pan finally click OK button. then you get one more Popup box here you choose the MVC option. Click the OK button. asp.net creates a template for a project.
                   
Asp.net MVC Controllers Tutorials

Step 3

           You can find the Controller folder has some Controller Classes with .cs extensions at the right side. every controller ends with Controller. You can observe from the Controller folder has three classes. These classes are AccountController.cs, HomeController, and ManageCotroller 

Asp.net MVC Controllers Tutorials

If you open any one controller then you find the controller inherited from Controller. and each controller has Action Methods. From the below image, you can observe. 

Asp.net MVC Controllers Tutorials






                                               Asp.Net MVC  - Get Started

  1. Asp.net MVC Tutorials- Get Started 
  2. Architecture
  3. First Application
  4. Folder Structure
  5. Controller
  6. Views
  7. Model
  8. Bundling
  9. View Bag
  10. Temp Data
  11. View Data
  12. Action Methods
  13. Action Selectors
  14. HTML Helpers
  15. Partial Views
  16. Layout View
  17. Filters
  18. Action Filters
  19. Validations
  20. Area
  21. What is Entity Framework and types  
  22. Creating Project in Database First Approach
  23. Creating Project in Code first approach
  24. Creating Project in Model Base First approach






No comments: