This repository has been archived by the owner on Feb 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_Form.cshtml
54 lines (44 loc) · 1.46 KB
/
_Form.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@model Customer
<p class="error">@TempData["error"]</p>
@using (Html.BeginForm("Save", "Customer"))
{
@Html.Hidden("Id", Model.Id)
@Html.ActionNameField()
<div>
<label>
First Name:
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control", required = "requred" })
</label>
</div>
<div>
<label>
Last Name:
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control", required = "requred" })
</label>
</div>
<div>
<label>
Address:
@Html.TextBoxFor(model => model.Address, new { @class = "form-control" })
</label>
</div>
<div>
<label>
Customer Type:
@Html.DropDownList("TypeId", ViewData["CustomerTypeSelect"] as SelectList, "(select)", new { required = "required", @class = "form-control" })
</label>
</div>
<div>
<label>
Region:
@Html.DropDownList("RegionId", ViewData["RegionSelect.RegionId"] as SelectList, "(select)", new { required = "required", @class = "form-control" })
</label>
</div>
<div>
<label>
Other Region:
@Html.DropDownList("OtherRegionId", ViewData["RegionSelect.OtherRegionId"] as SelectList, "(select)", new { required = "required", @class = "form-control" })
</label>
</div>
<input type="submit" value="Save" class="btn btn-primary"/>
}