PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/MvcMusicStore/Views/StoreManager/Create.cshtml

#
Razor | 65 lines | 54 code | 11 blank | 0 comment | 0 complexity | 51032d36f2c7cf74731ed9db2fcb445c MD5 | raw file
  1. @model MvcMusicStore.Models.Album
  2. @{
  3. ViewBag.Title = "Create";
  4. }
  5. <h2>Create</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. <div class="editor-label">
  13. @Html.LabelFor(model => model.GenreId, "Genre")
  14. </div>
  15. <div class="editor-field">
  16. @Html.DropDownList("GenreId", String.Empty)
  17. @Html.ValidationMessageFor(model => model.GenreId)
  18. </div>
  19. <div class="editor-label">
  20. @Html.LabelFor(model => model.ArtistId, "Artist")
  21. </div>
  22. <div class="editor-field">
  23. @Html.DropDownList("ArtistId", String.Empty)
  24. @Html.ValidationMessageFor(model => model.ArtistId)
  25. </div>
  26. <div class="editor-label">
  27. @Html.LabelFor(model => model.Title)
  28. </div>
  29. <div class="editor-field">
  30. @Html.EditorFor(model => model.Title)
  31. @Html.ValidationMessageFor(model => model.Title)
  32. </div>
  33. <div class="editor-label">
  34. @Html.LabelFor(model => model.Price)
  35. </div>
  36. <div class="editor-field">
  37. @Html.EditorFor(model => model.Price)
  38. @Html.ValidationMessageFor(model => model.Price)
  39. </div>
  40. <div class="editor-label">
  41. @Html.LabelFor(model => model.AlbumArtUrl)
  42. </div>
  43. <div class="editor-field">
  44. @Html.EditorFor(model => model.AlbumArtUrl)
  45. @Html.ValidationMessageFor(model => model.AlbumArtUrl)
  46. </div>
  47. <p>
  48. <input type="submit" value="Create" />
  49. </p>
  50. </fieldset>
  51. }
  52. <div>
  53. @Html.ActionLink("Back to List", "Index")
  54. </div>