Duration: 17 minutes
Summary: When we left off in the previous video, we had a controller and method that displays simple string. I mentioned to you that we are using strings because we did not have a view yet. In this video, we add the view to the method. We added some more text to the view and called the Index() method to display the view. Then, we talked about passing information between the controller and the view. To do so, we used the ViewBag. We stored some text in the ViewBag using Message (we named it message but you can name it anything you want). We retrieved the Message in the view using the following syntax: @ViewBag.Message. Finally, we talked more about the razor engine and its syntax. We declared variables in the block and retrieved those variables in the view using the syntax @variableName.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET MVC 3 and Visual Studio 2010
Keyword: ASP.NET 4, MVC 3, Visual Studio 2010, Model, View, Controller, Scaffolding, Routing.