我想添加另一个下拉列表。下面的代码适用于一个下拉列表,但我如何为类别添加一个?
public ActionResult Create()
{
var ddl = new Users();
ddl.DropDowns = userRepository.Getddl("Departments").Select(c => new SelectListItem
{
Value = c.DropdownID.ToString(),
Text = c.DropdownText
});
ViewData["ListofProfiles"] = new SelectList(ListofProfiles, "Value", "Text");
return View(ddl);
}