我看到 的views 的方法:
<div class="form-group"> @Html.LabelFor(model => model.ArtistId, "ArtistId", new { = "control-label col-md-2" }) <div class="col-md-10"> @Html.DropDownList("ArtistId", String.Empty) @Html.ValidationMessageFor(model => model.ArtistId) </div> </div><div class="form-group">
@Html.LabelFor(model => model.Title, new { @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title) </div> </div>
<dt>
@Html.DisplayNameFor(model => model.Price) </dt><dd>
@Html.DisplayFor(model => model.Price)
actions 里面传参
@Html.ActionLink("Edit", "Edit", new { id = Model.AlbumId })
HTML辅助方法: