I was taking ASP.NET course from YouTube by kudvenkat and some other random resources. So, this is my practice repo.
MVC Stands for Model View Controller. Motivation behind is
Controller responds to URL request Controller get data from Model Controller hands over the data to View View renders the data. Modoles can b either enitities or business objects.
###1. Passing List from Controller to View In this module, there is a demonstration of passing list from Controller to View.
###2. Simple MVC Project
- You have to pass employee from Controller to View so that it is accessible, null exception will be thrown otherwise.
- If you controller action method is not Index then you have to specify that in URL. Let say your controller name is employee and action method name is details, then your URL must be http://localhost/SimpleMVC/*employee*/*details*. (My controller name is Employee not Home so, I have to enter localhost/employee in URL)
- While creating a view, strogly-typed view is recommended. (for that, you need to build the project first)