title: How to get the ID of a LinkButton that was previously clicked in a Repeater control?
body: <p>I have a repeater control that has a <code>LinkButton</code> in it. Using command argument, I perform necessary functions in the code-behind. I want to turn the forecolor of a <code>LinkButton</code> to red after it is clicked and if another <code>LinkButton</code> is clicked in the <code>Repeater</code>, I want to turn off the previously clicked <code>LinkButton</code> to black and the recently clicked one to red. How do I do that? Here is my code:</p>
  
  <pre><code>&lt;asp:Repeater ID="Repeater1" runat="server"&gt;
      &lt;HeaderTemplate&gt;
          &lt;ul&gt;
      &lt;/HeaderTemplate&gt;
      &lt;ItemTemplate&gt;
              &lt;li&gt;
                  &lt;asp:LinkButton ID="LinkButton1" runat="server" Text='&lt;%#Eval("divisionlabel") %&gt;'
                                  OnCommand="LinkButton1_Command" CommandName="MyPendingApps" CommandArgument='&lt;%#Eval("divisionid") %&gt;'&gt;
                  &lt;/asp:LinkButton&gt;
              &lt;/li&gt;
      &lt;/ItemTemplate&gt;
      &lt;FooterTemplate&gt;
              &lt;li&gt;
                  &lt;asp:LinkButton ID="LinkButton_InsReqList" runat="server" OnCommand="LinkButton_InsReqList_Command"
                                  CommandName="InspectionRequests"&gt;Inspection Requests List&lt;/asp:LinkButton&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/FooterTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>