Database Reference
In-Depth Information
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Entity Framework Recipes - Recipe 1</title>
</head>
<body>
<h2>Manage Apps Category</h2>
@using (Html.BeginForm()) {
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<fieldset>
<legend>Category</legend>
<div class="editor-label">
@Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Name)
@Html.ValidationMessageFor(model => model.Name)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Description)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Description)
@Html.ValidationMessageFor(model => model.Description)
</div>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>
<script src="~/Scripts/jquery-1.8.2.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
</body>
</html>
The code of the index view in Listing 4-3 displays a page that lists the app categories, along with the buttons
for inserting new categories as well as those for editing and deleting current categories. This index page is shown in
Figure 4-11 .
Search WWH ::




Custom Search