protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var seasonRepository = new SeasonRepository(); var seasons = seasonRepository.GetAll(); SeasonList.DataSource = seasons; SeasonList.DataValueField = "Id"; SeasonList.DataTextField = "Name"; SeasonList.DataBind(); var currentSeason = seasonRepository.GetCurrent(); SeasonList.SelectedValue = currentSeason.Id.ToString(); var races = currentSeason.Races; RaceList.DataSource = races; RaceList.DataValueField = "Id"; RaceList.DataTextField = "Name"; RaceList.DataBind(); } }