摘要:
@model IEnumerable<MvcMusicStore.Models.Album>@helper Truncate(string input, int length){if (input.Length <= length) { @input} else { @input.Substring(0, length)<text>...</text>}}@{ViewBag.Title = "Index"; }<h2>Index</h2><p> @Html.ActionLink("Cre 阅读全文
摘要:
public ActionResult Create(){ViewBag.GenreId = new SelectList(db.Genres, "GenreId", "Name");ViewBag.ArtistId = new SelectList(db.Artists, "ArtistId", "Name");return View();}@Html.DropDownList("GenreId", String.Empty) 阅读全文