我的控制器中有:
ViewBag.CityId = new SelectList(new CityRepository().GetAll().OrderBy(x => x.Name),"CityId", "Name", new Guid("74898AD1-73BB-41E1-B1E1-484EACAFA4C4"));
在我看来:
<%:Html.DropDownList("CityId", (IEnumerable<SelectListItem>)ViewBag.CityId, new { @class = "select-choice-1" })%>
但问题是没有选择默认值。如何一次设置默认值和Css Class?