LICT .NET Training | Kamal Protap Sir | Part 4

MVC Part:

Controller getting input.

ApplicationManagement video was so important

 

In Controller Folder HomeController.Cs is a controller which is controlling all the things

here is the code:

App_Start Folder:

RouteConfig.cs file we will find that

Views/Home/About
Views/Home/Contact

How to communicate with Controller and View:
ViewData and ViewBag passing the data from a controller to view

Interview questions:
ViewData: ViewData is dictionary of objects that is dervied from ViewData dictionary class and is accessible using string as keys.

ViewBag: viewBag is dynamic property. That take advantages of dynamic features.

both does not provide any compile time error.

 

In model we need to write the business logic.

In View we can show the actual things what we want to show:

View->Details.cshtml

Employee.cs

EmployeeController.cs

 

 

 

Spread the love