11.1.4.2 Creating the Edit View; Listing 11-6 The Contents of the Edit.cshtml File
This commit is contained in:
parent
35c520e1ed
commit
f1cdbf375b
@ -161,6 +161,7 @@
|
||||
<Content Include="Views\Cart\Completed.cshtml" />
|
||||
<Content Include="Views\Shared\_AdminLayout.cshtml" />
|
||||
<Content Include="Views\Admin\Index.cshtml" />
|
||||
<Content Include="Views\Admin\Edit.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
18
SportsStore/SportsStore.WebUI/Views/Admin/Edit.cshtml
Normal file
18
SportsStore/SportsStore.WebUI/Views/Admin/Edit.cshtml
Normal file
@ -0,0 +1,18 @@
|
||||
@model SportsStore.Domain.Entities.Product
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Edit";
|
||||
Layout = "~/Views/Shared/_AdminLayout.cshtml";
|
||||
}
|
||||
|
||||
<h1>Edit @Model.Name</h1>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.EditorForModel()
|
||||
<input type="submit" value="Save" />
|
||||
@Html.ActionLink("Cancel and return to List", "List")
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
|
Loading…
x
Reference in New Issue
Block a user