I have a drop down in aspx that is binded using a class that has a function that retrieves a list of departments. There is a department Name “Audits and Verifying”. I do not want to modify the query to do a select Name, DepatmentValueName from departments where DepartmentValueName <> 'AuditsVerifying' . Instead I want to hide it some how in the code in C# is this possible?
DepartmentsAdmin DepartmentName = new DepartmentsAdmin();
DepartmentType.DataSource = DepartmentName.GetAllDepartments();
DepartmentType.DataTextField = "Name";
DepartmentType.DataValueField = "DepartmentValueName";
DepartmentType.DataBind();
Thank you in advance
Try this-