PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/MvcMusicStore/Views/StoreManager/Edit.cshtml

#
Razor | 67 lines | 55 code | 12 blank | 0 comment | 0 complexity | 993cb9971f7298e2f34e86795e8689fe MD5 | raw file
 1@model MvcMusicStore.Models.Album
 2
 3@{
 4    ViewBag.Title = "Edit";
 5}
 6
 7<h2>Edit</h2>
 8
 9<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
10<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
11
12@using (Html.BeginForm()) {
13    @Html.ValidationSummary(true)
14    <fieldset>
15        <legend>Album</legend>
16
17        @Html.HiddenFor(model => model.AlbumId)
18
19        <div class="editor-label">
20            @Html.LabelFor(model => model.GenreId, "Genre")
21        </div>
22        <div class="editor-field">
23            @Html.DropDownList("GenreId", String.Empty)
24            @Html.ValidationMessageFor(model => model.GenreId)
25        </div>
26
27        <div class="editor-label">
28            @Html.LabelFor(model => model.ArtistId, "Artist")
29        </div>
30        <div class="editor-field">
31            @Html.DropDownList("ArtistId", String.Empty)
32            @Html.ValidationMessageFor(model => model.ArtistId)
33        </div>
34
35        <div class="editor-label">
36            @Html.LabelFor(model => model.Title)
37        </div>
38        <div class="editor-field">
39            @Html.EditorFor(model => model.Title)
40            @Html.ValidationMessageFor(model => model.Title)
41        </div>
42
43        <div class="editor-label">
44            @Html.LabelFor(model => model.Price)
45        </div>
46        <div class="editor-field">
47            @Html.EditorFor(model => model.Price)
48            @Html.ValidationMessageFor(model => model.Price)
49        </div>
50
51        <div class="editor-label">
52            @Html.LabelFor(model => model.AlbumArtUrl)
53        </div>
54        <div class="editor-field">
55            @Html.EditorFor(model => model.AlbumArtUrl)
56            @Html.ValidationMessageFor(model => model.AlbumArtUrl)
57        </div>
58
59        <p>
60            <input type="submit" value="Save" />
61        </p>
62    </fieldset>
63}
64
65<div>
66    @Html.ActionLink("Back to List", "Index")
67</div>