<<назад Students/Edit.vbhtml (Contoso University).
1: @ModelType CU_VB_3.Models.Student
2: @Code
3: ViewData("Title") = "Edit"
4: Layout = "~/Views/Shared/_Layout.vbhtml"
5: End Code
6:
7: <h2>Edit</h2>
8:
9: @Using (Html.BeginForm())
10: @Html.AntiForgeryToken()
11:
12: @<div class="form-horizontal">
13: <h4>Student</h4>
14: <hr />
15: @Html.ValidationSummary(True, "", New With { .class = "text-danger" })
16: @Html.HiddenFor(Function(model) model.ID)
17:
18: <div class="form-group">
19: @Html.LabelFor(Function(model) model.LastName, htmlAttributes:= New With { .class = "control-label col-md-2" })
20: <div class="col-md-10">
21: @Html.EditorFor(Function(model) model.LastName, New With { .htmlAttributes = New With { .class = "form-control" } })
22: @Html.ValidationMessageFor(Function(model) model.LastName, "", New With { .class = "text-danger" })
23: </div>
24: </div>
25:
26: <div class="form-group">
27: @Html.LabelFor(Function(model) model.FirstMidName, htmlAttributes:= New With { .class = "control-label col-md-2" })
28: <div class="col-md-10">
29: @Html.EditorFor(Function(model) model.FirstMidName, New With { .htmlAttributes = New With { .class = "form-control" } })
30: @Html.ValidationMessageFor(Function(model) model.FirstMidName, "", New With { .class = "text-danger" })
31: </div>
32: </div>
33:
34: <div class="form-group">
35: @Html.LabelFor(Function(model) model.EnrollmentDate, htmlAttributes:= New With { .class = "control-label col-md-2" })
36: <div class="col-md-10">
37: @Html.EditorFor(Function(model) model.EnrollmentDate, New With { .htmlAttributes = New With { .class = "form-control" } })
38: @Html.ValidationMessageFor(Function(model) model.EnrollmentDate, "", New With { .class = "text-danger" })
39: </div>
40: </div>
41:
42: <div class="form-group">
43: <div class="col-md-offset-2 col-md-10">
44: <input type="submit" value="Save" class="btn btn-default" />
45: </div>
46: </div>
47: </div>
48: End Using
49:
50: <div>
51: @Html.ActionLink("Back to List", "Index")
52: </div>
53:
54: @Section Scripts
55: @Scripts.Render("~/bundles/jqueryval")
56: End Section
Comments (
)
Link to this page:
//www.vb-net.com/EF-missing-FAQ/Code/Students-Edit.vbhtml.htm
|