PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms 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@{
 4    ViewBag.Title = "Create";
 5}
 6
 7<h2>Create</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        <div class="editor-label">
18            @Html.LabelFor(model => model.GenreId, "Genre")
19        </div>
20        <div class="editor-field">
21            @Html.DropDownList("GenreId", String.Empty)
22            @Html.ValidationMessageFor(model => model.GenreId)
23        </div>
24
25        <div class="editor-label">
26            @Html.LabelFor(model => model.ArtistId, "Artist")
27        </div>
28        <div class="editor-field">
29            @Html.DropDownList("ArtistId", String.Empty)
30            @Html.ValidationMessageFor(model => model.ArtistId)
31        </div>
32
33        <div class="editor-label">
34            @Html.LabelFor(model => model.Title)
35        </div>
36        <div class="editor-field">
37            @Html.EditorFor(model => model.Title)
38            @Html.ValidationMessageFor(model => model.Title)
39        </div>
40
41        <div class="editor-label">
42            @Html.LabelFor(model => model.Price)
43        </div>
44        <div class="editor-field">
45            @Html.EditorFor(model => model.Price)
46            @Html.ValidationMessageFor(model => model.Price)
47        </div>
48
49        <div class="editor-label">
50            @Html.LabelFor(model => model.AlbumArtUrl)
51        </div>
52        <div class="editor-field">
53            @Html.EditorFor(model => model.AlbumArtUrl)
54            @Html.ValidationMessageFor(model => model.AlbumArtUrl)
55        </div>
56
57        <p>
58            <input type="submit" value="Create" />
59        </p>
60    </fieldset>
61}
62
63<div>
64    @Html.ActionLink("Back to List", "Index")
65</div>