+ @using (Html.BeginForm(controllerName: "Home", actionName: "Edit", method: FormMethod.Post))
+ {
|
- @Html.LabelFor(model => model.Name, "DisplayFor Name")
+ @Html.LabelFor(model => model.Name, "DisplayFor / EditFor Name")
|
'@Html.DisplayFor(model => model.Name)'
|
+
+ @Html.EditorFor(model => model.Name)
+ |
|
- @Html.LabelFor(model => model.Dependent.Name, "DisplayFor Dependent.Name")
+ @Html.LabelFor(model => model.Dependent.Name, "DisplayFor / EditFor Dependent.Name")
|
'@Html.DisplayFor(model => model.Dependent.Name)'
|
+
+ @Html.EditorFor(model => model.Dependent.Name)
+ |
|
- @Html.LabelFor(model => model.Alive, "DisplayFor Alive")
+ @Html.LabelFor(model => model.Alive, "DisplayFor / EditFor Alive")
|
'@Html.DisplayFor(model => model.Alive)'
|
+
+ @Html.EditorFor(model => model.Alive)
+ |
|
- @Html.LabelFor(model => model.Dependent.Alive, "DisplayFor Dependent.Alive")
+ @Html.LabelFor(model => model.Dependent.Alive, "DisplayFor / EditFor Dependent.Alive")
|
'@Html.DisplayFor(model => model.Dependent.Alive)'
|
+
+ @Html.EditorFor(model => model.Dependent.Alive)
+ |
|
- @Html.LabelFor(model => model.Age, "DisplayFor Age")
+ @Html.LabelFor(model => model.Age, "DisplayFor / EditFor Age")
|
'@Html.DisplayFor(model => model.Age)'
|
+
+ @Html.EditorFor(model => model.Age)
+ |
|
- @Html.LabelFor(model => model.GPA, "DisplayFor GPA")
+ @Html.LabelFor(model => model.GPA, "DisplayFor / EditFor GPA")
|
'@Html.DisplayFor(model => model.GPA)'
|
+
+ @Html.EditorFor(model => model.GPA)
+ |