public void loadSubjectandGrades() { DatabaseFunctions db = new DatabaseFunctions(); DataSet ds = new DataSet(); ds = db.getSubjects(); if (ds.Tables[0].Rows.Count > 0) { dropdownOlevelSub1.DataSource = ds.Tables[0]; dropdownOlevelSub1.DataBind(); dropdownOlevelSub2.DataSource = ds.Tables[0]; dropdownOlevelSub2.DataBind(); dropdownolevelSub3.DataSource = ds.Tables[0]; dropdownolevelSub3.DataBind(); dropdownOlvlSub4.DataSource = ds.Tables[0]; dropdownOlvlSub4.DataBind(); dropdownOlevelsub5.DataSource = ds.Tables[0]; dropdownOlevelsub5.DataBind(); dropdownOlevelSub6.DataSource = ds.Tables[0]; dropdownOlevelSub6.DataBind(); dropdownOlevelSub7.DataSource = ds.Tables[0]; dropdownOlevelSub7.DataBind(); dropdownolevelSub8.DataSource = ds.Tables[0]; dropdownolevelSub8.DataBind(); dropdowOlevelSub9.DataSource = ds.Tables[0]; dropdowOlevelSub9.DataBind(); dropdownOlevelsubject1b.DataSource = ds.Tables[0]; dropdownOlevelsubject1b.DataBind(); dropdownOlevelSub2b.DataSource = ds.Tables[0]; dropdownOlevelSub2b.DataBind(); dropdownolevelSub3b.DataSource = ds.Tables[0]; dropdownolevelSub3b.DataBind(); dropdownOlvlSub4b.DataSource = ds.Tables[0]; dropdownOlvlSub4b.DataBind(); dropdownOlevelsub5b.DataSource = ds.Tables[0]; dropdownOlevelsub5b.DataBind(); dropdownOlevelSub6b.DataSource = ds.Tables[0]; dropdownOlevelSub6b.DataBind(); dropdownOlevelSub7b.DataSource = ds.Tables[0]; dropdownOlevelSub7b.DataBind(); dropdownolevelSub8b.DataSource = ds.Tables[0]; dropdownolevelSub8b.DataBind(); dropdowOlevelSub9b.DataSource = ds.Tables[0]; dropdowOlevelSub9b.DataBind(); } }