title: Change link button color in Repeater
body: <p>I am using <code>Data Repeater</code> and <code>Link Button</code> inside <code>repeater</code> . I want to change the color of clicked <code>button</code> but it is not working . Here is my code.</p>
  
  <pre><code>&lt;asp:Repeater  ID="rptPager" runat="server"&gt;
                               &lt;ItemTemplate&gt;
                           &lt;asp:LinkButton Font-Size="Larger" BackColor="Orange" ForeColor="White"  ID="lnkPage" runat="server" Text='&lt;%#Eval("Text") %&gt;' CommandArgument='&lt;%# Eval("Value") %&gt;'
                              CssClass=" btn"
                              OnClick="Page_Changed"&gt;&lt;/asp:LinkButton&gt;
                               &lt;/ItemTemplate&gt;
                               &lt;/asp:Repeater&gt;
  
  
  protected void Page_Changed(object sender, EventArgs e)
  {
  
      int pageIndex = int.Parse((sender as LinkButton).CommandArgument);
      LinkButton lnk = (LinkButton)sender;
      lnk.ForeColor = System.Drawing.Color.Red;
      lnk.BackColor = System.Drawing.Color.Red;
  
      this.GetImagesPageWise(pageIndex);
  
  }
  </code></pre>