Costomers och Movies fungerar med validation
This commit is contained in:
@ -17,7 +17,7 @@ else
|
||||
|
||||
@using (@Html.BeginForm("Save", "Customers"))
|
||||
{
|
||||
@Html.ValidationSummary(true, "Please fix the following errors.")
|
||||
@Html.ValidationSummary(true, "Var snäll och åtgärda felen.")
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(m => m.Customer.Name)
|
||||
@Html.TextBoxFor(m => m.Customer.Name, new { @class = "form-control" })
|
||||
@ -39,6 +39,12 @@ else
|
||||
</label>
|
||||
</div>
|
||||
@Html.HiddenFor(m => m.Customer.Id)
|
||||
@Html.AntiForgeryToken();
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
|
||||
}
|
||||
|
||||
@section scripts
|
||||
{
|
||||
@Scripts.Render("~/bundles/jqueryval")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user