void DisplayLink.SetInitialDisplay(PostBackValueDictionary formControlValues)
 {
     foreach (var c in controls)
     {
         DisplayLinkingOps.SetControlDisplay(c, controlsVisibleWhenBoxChecked == checkBox.IsCheckedInPostBack(formControlValues));
     }
 }
        private static void linkFirstPanelCheckBoxToNextPanelDisplay(PostBackValueDictionary formControlValues, Control outerPanel)
        {
            var           panelIndex = 0;
            BlockCheckBox checkBox   = null;
            Panel         panel      = null;

            foreach (var control in outerPanel.Controls.OfType <Panel>())
            {
                panelIndex += 1;
                if (panelIndex == 1)
                {
                    checkBox = getFirstCheckBox(control);
                }
                else if (panelIndex == 2)
                {
                    panel = control;
                }
            }
            if (checkBox != null && panel != null)
            {
                if (formControlValues == null)
                {
                    DisplayLinkingOps.AddDisplayJavaScriptToCheckBox(checkBox, true, panel);
                }
                else
                {
                    DisplayLinkingOps.SetControlDisplay(panel, checkBox.IsCheckedInPostBack(formControlValues));
                }
            }
        }