PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 0ms 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. ViewBag.Title = "Edit";
  4. }
  5. <h2>Edit</h2>
  6. <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
  7. <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
  8. @using (Html.BeginForm()) {
  9. @Html.ValidationSummary(true)
  10. <fieldset>
  11. <legend>Album</legend>
  12. @Html.HiddenFor(model => model.AlbumId)
  13. <div class="editor-label">
  14. @Html.LabelFor(model => model.GenreId, "Genre")
  15. </div>
  16. <div class="editor-field">
  17. @Html.DropDownList("GenreId", String.Empty)
  18. @Html.ValidationMessageFor(model => model.GenreId)
  19. </div>
  20. <div class="editor-label">
  21. @Html.LabelFor(model => model.ArtistId, "Artist")
  22. </div>
  23. <div class="editor-field">
  24. @Html.DropDownList("ArtistId", String.Empty)
  25. @Html.ValidationMessageFor(model => model.ArtistId)
  26. </div>
  27. <div class="editor-label">
  28. @Html.LabelFor(model => model.Title)
  29. </div>
  30. <div class="editor-field">
  31. @Html.EditorFor(model => model.Title)
  32. @Html.ValidationMessageFor(model => model.Title)
  33. </div>
  34. <div class="editor-label">
  35. @Html.LabelFor(model => model.Price)
  36. </div>
  37. <div class="editor-field">
  38. @Html.EditorFor(model => model.Price)
  39. @Html.ValidationMessageFor(model => model.Price)
  40. </div>
  41. <div class="editor-label">
  42. @Html.LabelFor(model => model.AlbumArtUrl)
  43. </div>
  44. <div class="editor-field">
  45. @Html.EditorFor(model => model.AlbumArtUrl)
  46. @Html.ValidationMessageFor(model => model.AlbumArtUrl)
  47. </div>
  48. <p>
  49. <input type="submit" value="Save" />
  50. </p>
  51. </fieldset>
  52. }
  53. <div>
  54. @Html.ActionLink("Back to List", "Index")
  55. </div>