我用这个代码来填充下拉列表MVC填充下拉列表
ViewData["projectType"] = new SelectList
(_dataManager.Project.ProjectTypeList(), "Id", "Name");
,但如果我想使用一个不表列,但两个或多个列我必须这样做?例如
ViewData["projectType"] = new SelectList
(_dataManager.Project.ProjectTypeList(), "Id", "Name1"+"Name2");
这里有一个类似的问题http://stackoverflow.com/questions/2319691/can-i-customise-my-data-text-field-in-an -mvc-selectlist-for-the-use-the -help/2319842#2319842 – uvita 2010-03-14 19:46:51