/MvcMusicStore/Views/StoreManager/Edit.cshtml
Razor | 67 lines | 55 code | 12 blank | 0 comment | 0 complexity | 993cb9971f7298e2f34e86795e8689fe MD5 | raw file
- @model MvcMusicStore.Models.Album
-
- @{
- ViewBag.Title = "Edit";
- }
-
- <h2>Edit</h2>
-
- <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
- <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
-
- @using (Html.BeginForm()) {
- @Html.ValidationSummary(true)
- <fieldset>
- <legend>Album</legend>
-
- @Html.HiddenFor(model => model.AlbumId)
-
- <div class="editor-label">
- @Html.LabelFor(model => model.GenreId, "Genre")
- </div>
- <div class="editor-field">
- @Html.DropDownList("GenreId", String.Empty)
- @Html.ValidationMessageFor(model => model.GenreId)
- </div>
-
- <div class="editor-label">
- @Html.LabelFor(model => model.ArtistId, "Artist")
- </div>
- <div class="editor-field">
- @Html.DropDownList("ArtistId", String.Empty)
- @Html.ValidationMessageFor(model => model.ArtistId)
- </div>
-
- <div class="editor-label">
- @Html.LabelFor(model => model.Title)
- </div>
- <div class="editor-field">
- @Html.EditorFor(model => model.Title)
- @Html.ValidationMessageFor(model => model.Title)
- </div>
-
- <div class="editor-label">
- @Html.LabelFor(model => model.Price)
- </div>
- <div class="editor-field">
- @Html.EditorFor(model => model.Price)
- @Html.ValidationMessageFor(model => model.Price)
- </div>
-
- <div class="editor-label">
- @Html.LabelFor(model => model.AlbumArtUrl)
- </div>
- <div class="editor-field">
- @Html.EditorFor(model => model.AlbumArtUrl)
- @Html.ValidationMessageFor(model => model.AlbumArtUrl)
- </div>
-
- <p>
- <input type="submit" value="Save" />
- </p>
- </fieldset>
- }
-
- <div>
- @Html.ActionLink("Back to List", "Index")
- </div>