According to the Microsoft documentation, SelectList (IEnumerable, String, String) Initializes a new instance of the SelectList class using the specified elements for the list, data value field, and data field.
http://msdn.microsoft.com/en-us/library/system.web.mvc.selectlist%28v=vs.108%29.aspx
, . 8 ups - .
SelectList?
:
public class Model
{
public string pcode { get; set; }
public string pname { get; set; }
public string ConcatDescription { get; set; }
public string ConcatDescription
{
get
{
return string.Format("{0} {1}", pcode , pname );
}
}
}
.
SelectList(Parts, "pno", "ConcatDescription ")
EDIT: .