ASP.NET Link is not adding attributes
===

I am adding an attributes according to the tab index user goes to:

    Link hlTabLink;
    i = e.Item.DataItem as Item;
    hlTabLink = e.Item.FindControl("hlTabLink") as Link;
    hlTabLink.Target = Sitecore.Links.LinkManager.GetItemUrl(i);
    hlTabLink.DataSource = i.Paths.FullPath;
    hlTabLink.Field = "Title";
    String liContainerId;
    switch (hlTabLink.TabIndex) //Switch case statements for the tab navigation. 
                {
                    case 0:
                        liContainerId = "tab-label TabbedPanelsTabSelected";
                        hlTabLink.Attributes.Add("class", liContainerId);
                        break;
                    case 1:
                        liContainerId = "tab-label TabbedPanelsTabSelected";
                        hlTabLink.Attributes.Add("class", liContainerId);
                        break;
                    case 2:
                        liContainerId = "tab-label last";
                        hlTabLink.Attributes.Add("class", liContainerId);
                        break;
                }

My markup is looking like this after rendering:

    <div class="tab-panels" id="TabbedPanels1">
        <ul id="Tab-labels">
           
                    <li>
                        Overview
                    </li>
                
                    <li>
                        Why Me
                    </li>
                
        </ul>
</div>

What I am doing wrong here?