List<TeamsSportsInfo> listTeamsSportsInfo = (returns list)
ddlTeams.DataSource = listTeamsSportsInfo;
ddlTeams.DataTextField = "Key";
ddlTeams.DataValueField = "ID";
ddlTeams.DataBind();
//(the above code works just fine but we need the DataTextField to be DisplayNamesSportsInfo.FullName, any ideas?)
public class TeamsSportsInfo
{
public Int32 Id{ get; set; }
public String Key (get; set; }
public Int32 PublisherId { get; set; }
public Int32 HomeSiteId { get; set; }
public String HomeSiteName { get; set; }
public DisplayNamesSportsInfo DisplayNamesSportsInfo { get; set; }
}
public class DisplayNamesSportsInfo
{
public Int32 Id { get; set; }
public String FullName { get; set; }
}
|