private void getEmployeeBasedOnSexandBranch() { clearLabel(); GridView1.DataSource = null; GridView1.DataBind(); GridView1.EmptyDataText = ""; if (DropDownListSexBr.SelectedValue != "-1" && DropDownListSbranch.SelectedValue != "-1") { EmployeeManager manage = new EmployeeManager(); DataTable result = manage.getDistrictEmployeeBasedOnSexAndBranch(DropDownListSexBr.SelectedValue, DropDownListSbranch.SelectedValue); if (result != null && result.Rows.Count > 0) { GridView1.DataSource = result; GridView1.DataBind(); } } }