title: Setting TabContainer Active Tab dynamically by visibility
body: <p>I'm using AjaxControlToolkit <code>TabContainer</code> and dynamically setting <code>TabPanel</code> visiblility. When active tab is is hidden (dynamically) the whole Tab Control is hidden, so to avoid this I've written small method like this (setting first visible tab as Active Tab)</p>
  
  <pre><code>private void SetActiveTab()
  {
      if (tabControl1.Tabs[0].Visible)
      {
          tabControl1.ActiveTabIndex =0;
          return;
      }
  
      if (tabControl1.Tabs[1].Visible)
      {
          tabControl1.ActiveTabIndex = 1;
          return;
      }
  
      ...
  
  }
  </code></pre>
  
  <p>But this feels like but inefficient/ugly code for me..., Is there a better way of doing this...?</p>