0
我實現下面的方法來獲得部門陣列結合DROPDOWNLIST插入對象
public object[] GetDepartmentOptions()
{
var departments = from p in context.per_Departments
where p.active == true
select new { DisplayText = p.departmentNameEn,
Value = p.departmentId };
return departments.ToArray();
}
我想將其綁定
object =new { DisplayText = "Choose", Value = 0 };
謝謝你的幫助 –