把它放在ViewBag中。在你的控制器,你可以這樣做: ViewBag.selectList = from r in roles select new SelectListItem { Selected = (r.Id == Model.DefaultRole.
確定! 回上一頁