protected void DropDownListSex_SelectedIndexChanged(object sender, EventArgs e) { clearLabel(); //RESET DROPDOWN LISTS JobTitleDropBox.ClearSelection(); DropDmajorCategory.ClearSelection(); JTitWBranchDropBox.ClearSelection(); DropDownListJTBranch.ClearSelection(); DropDownListSexBr.ClearSelection(); DropDownListSbranch.ClearSelection(); dateStart0.Text = ""; DateEnd0.Text = ""; dateStart.Text = ""; DateEnd.Text = ""; GridView1.DataSource = null; GridView1.DataBind(); GridView1.EmptyDataText = ""; if (DropDownListSex.SelectedValue != "-1") { EmployeeManager manage = new EmployeeManager(); DataTable result = manage.getDistrictEmployeeBasedOnSex(DropDownListSex.SelectedValue); if (result != null && result.Rows.Count > 0) { GridView1.DataSource = result; GridView1.DataBind(); } } }