private void BindTrainingList()
    {
        DataTable dt = new DataTable();

        if (System.Configuration.ConfigurationManager.AppSettings["TrainingSupportManagers"].Contains(iAm))
        {
            dt = TrainingList.GetAllTrainingDataTable();
        }
        else
        {
            dt = TrainingList.GetAllTrainingIOwnDataTable(iAm);
        }
        ddlTraining.DataSource     = dt;
        ddlTraining.DataTextField  = dt.Columns[0].ToString();
        ddlTraining.DataValueField = dt.Columns[1].ToString();
        ddlTraining.DataBind();
    }
    private void BindTrainingList()
    {
        DropDownList ddlTraining = (DropDownList)this.dlPersonnel.Controls[this.dlPersonnel.Controls.Count - 1].Controls[0].FindControl("ddlTraining"); //finds the control in the footer of a datalist
        DataTable    dt          = new DataTable();

        if (System.Configuration.ConfigurationManager.AppSettings["TrainingSupportManagers"].Contains(iAm))
        {
            dt = TrainingList.GetAllTrainingDataTable();
        }
        else
        {
            dt = TrainingList.GetAllTrainingIOwnDataTable(iAm);
        }
        ddlTraining.DataSource     = dt;
        ddlTraining.DataTextField  = dt.Columns[0].ToString();
        ddlTraining.DataValueField = dt.Columns[1].ToString();
        ddlTraining.DataBind();
    }