コード例 #1
0
        /// <summary>
        /// Uses the Category field of Metadata surveys to drive drop down selections
        /// </summary>
        public static void PopulateSurveyDropDown(DropDownList ddlSurveyType)
        {
            FollowUpDA da = new FollowUpDA();
            DataTable  dt = da.GetMetadataSurveysByCategory("QOL");

            ddlSurveyType.DataSource     = dt;
            ddlSurveyType.DataTextField  = MetadataSurvey.SurveyType; //set in front end but to make sure if name changes
            ddlSurveyType.DataValueField = MetadataSurvey.SurveyType;
            ddlSurveyType.DataBind();
        }