/MvcMusicStore/Views/StoreManager/Create.cshtml
Razor | 65 lines | 54 code | 11 blank | 0 comment | 0 complexity | 51032d36f2c7cf74731ed9db2fcb445c MD5 | raw file
- @model MvcMusicStore.Models.Album
-
- @{
- ViewBag.Title = "Create";
- }
-
- <h2>Create</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>
-
- <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="Create" />
- </p>
- </fieldset>
- }
-
- <div>
- @Html.ActionLink("Back to List", "Index")
- </div>