public static void Load (DropDownList comboWorkingHours, TextBox textWorkingHours, string workingHours) { // search for working hours text in a combo comboWorkingHours.SelectByText (workingHours, StringComparison.CurrentCultureIgnoreCase); if (comboWorkingHours.SelectedIndex <= 0) textWorkingHours.Text = workingHours; }