Duration: 16 minutes
Summary: We build the form by adding the text boxes, the drop downs, and the submit button. All of this will be done using the Html helper methods and lambda expressions. We start the form with the “using” statement to have the object disposed off automatically. The BeginForm Html helper method will help us create an html form. Inside that form we will use the TextBoxFor and DropDownListFor helper methods to create text boxes and dropdown list accordingly. The DropDownListFor helper method uses the SelectListItem object to add items to the dropdown list. Since this is a strongly typed view, we are able to reference the properties of the Visitor object using lambda expressions.
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, Html, ActionLink, Action method, Razor engine, BeginForm, TextBoxFor, DropDownListFor, SelectListItem.