绑定Html.DropDownList

| 在我的Employee表中,字段像EmployeeID,FirstName,MiddleName,LastName等。 我想将Html.DropDownList像EmployeeID一样绑定为dataValueField,并将FirstName + MiddleName + LAstName绑定为dataTextField。我该如何绑定?     
已邀请:
Create a partial class and set a property like this

    public string Name
    {
        get
        {
            return string.Format(\"{0} {1} {2}\", FirstName, MiddleName, LastName);
        }
    }

Give \'Name\' as the dataTextField
    

要回复问题请先登录注册