Tab panel problem
<p>How can I get selected tab index of tab panel using JavaScript and then assign a button validation group according to selected tab index?</p>

<p>This is my code so far:</p>

<pre><code>function ActiveTab()
{
    var a= $find("tcEmployee").get_activeTabIndex();
    var add=document.setElementById('&lt;%=btnAddRecord.ClientID%&gt;');
    var update=document.getElementById('&lt;%= btnUpdateRecord.ClientID%&gt;');
    var delet  document.getElementById('&lt;%= btnDeleteRecord.ClientID%&gt;');
    if (a == 0)
    {
        add.ValidationGroup = "Insertion";
        update.ValidationGroup = "Insertion";
        delet.ValidationGroup = "Insertion";
    }
    else if (a == 1)
    {
        add.ValidationGroup = "Insertion1";
        update.ValidationGroup = "Insertion1";
        delet.ValidationGroup = "Insertion1";
    }
    else
    {
        add.ValidationGroup = "Insertion2";
        update.ValidationGroup = "Insertion2";
        delet.ValidationGroup = "Insertion2";
    }
}
</code></pre>
