title: Sitecore Link is not adding attributes
body: <p>I am using Sitecore and using VS2010 (Version 4). I am adding attributes from the code behind according to the tab index user goes to:</p>
  
  <pre><code>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;
              }
  </code></pre>
  
  <p>This is the markup of .ascx control:</p>
  
  <pre><code>&lt;div class="tab-panels" id="TabbedPanels1"&gt;
      &lt;ul id="Tab-labels"&gt;
         &lt;asp:Repeater ID="rptTab" runat="server" OnItemDataBound="rptTab_ItemBound"&gt;
              &lt;ItemTemplate&gt;
                  &lt;li&gt;
                      &lt;sc:Link ID = "hlTabLink" Field = "scTabLink" runat ="server"&gt;&lt;/sc:Link&gt;
                  &lt;/li&gt;
              &lt;/ItemTemplate&gt;
         &lt;/asp:Repeater&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p></p>
  
  <p>My markup is looking like this after rendering:</p>
  
  <pre><code>&lt;div class="tab-panels" id="TabbedPanels1"&gt;
      &lt;ul id="Tab-labels"&gt;
  
                  &lt;li&gt;
                      Overview
                  &lt;/li&gt;
  
                  &lt;li&gt;
                      Why Me
                  &lt;/li&gt;
  
      &lt;/ul&gt;
  </code></pre>
  
  <p></p>
  
  <p>What I am doing wrong here?</p>