From e434ab94558a040d012e73f97f9678e986bfd0c1 Mon Sep 17 00:00:00 2001 From: Mark J Price Date: Thu, 8 Jun 2023 11:42:05 +0100 Subject: [PATCH] Replace Html helper with tag helpers --- .../Views/Home/AddCustomer.cshtml | 47 ++++++++----------- .../Views/Home/AddCustomer.cshtml | 47 ++++++++----------- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/vs4win/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml b/vs4win/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml index 2308561..dba8014 100644 --- a/vs4win/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml +++ b/vs4win/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml @@ -9,52 +9,43 @@ -->
- - @Html.EditorFor(model => model.CustomerId, - new { htmlAttributes = new { @class = "form-control" } }) + +
Customer ID must be five (5) upper case characters.
- - @Html.EditorFor(model => model.CompanyName, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.ContactName, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Address, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.City, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Region, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Country, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.PostalCode, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Phone, - new { htmlAttributes = new { @class = "form-control" } }) + +
Cancel and return to Customers - @Html.ValidationSummary() +
diff --git a/vscode/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml b/vscode/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml index 2308561..dba8014 100644 --- a/vscode/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml +++ b/vscode/PracticalApps/Northwind.Mvc/Views/Home/AddCustomer.cshtml @@ -9,52 +9,43 @@ -->
- - @Html.EditorFor(model => model.CustomerId, - new { htmlAttributes = new { @class = "form-control" } }) + +
Customer ID must be five (5) upper case characters.
- - @Html.EditorFor(model => model.CompanyName, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.ContactName, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Address, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.City, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Region, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Country, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.PostalCode, - new { htmlAttributes = new { @class = "form-control" } }) + +
- - @Html.EditorFor(model => model.Phone, - new { htmlAttributes = new { @class = "form-control" } }) + +
Cancel and return to Customers - @Html.ValidationSummary() +