Hi, Could some one please show me how I can rewrite the below method in a better and more elegant way?
// in class------------------
public static void RefreshAllDropdownlists(DropDownList ddlRemoveUsersFromRole, DropDownList ddlAddUsersToRole, DropDownList ddlAddAllUsersToRole, DropDownList ddlRemoveAllUsersFromRole, DropDownList ddlDeleteAllUsersFromRole)
{
ddlRemoveUsersFromRole.ClearSelection();
ddlAddUsersToRole.ClearSelection();
ddlAddAllUsersToRole.ClearSelection();
ddlRemoveAllUsersFromRole.ClearSelection();
ddlDeleteAllUsersFromRole.ClearSelection();
}
// in codebehind------------------
UserGvUtil.RefreshAllDropdownlists(ddlRemoveUsersFromRole, ddlAddUsersToRole, ddlAddAllUsersToRole, ddlRemoveAllUsersFromRole, ddlDeleteAllUsersFromRole);
Thank you!