This can be done with the lot of other ways, but the easiest way is to leverage with SQL to do what you want. Essentially you need to create a class that represents binding to a particular UI. So you would map your Model (My Object in your example) to a ViewModel object, and then bind the drop down list that way.
Code:
List<MyObject> myList = getObjects();
ddList.DataSource = (from obj1 in myList
select new
{
pro = obj1.pro,
Name = string.Format("{0} ({1})", obj1.Name, obj1.Zip)
}).ToList();
ddList.DataValueField = "pro";
ddList.DataTextField = "Name";
ddList.DataBind();
Bookmarks