title: Changing the color of a linkbutton on click?
body: <p>I have a user control called courses that displays all the available courses. In my user control file, I use a repeater control to display the courses. All the course names are rendered as linkbuttons inside itemtemplate. I use this user control in page called foo.aspx. I am using a javascript function to change the color of the value inside the itemtemplate when clicked. The color changes for a second when I click, but it goes back to its original color. Does anyone know what I am doing wrong here?</p>
  
  <p>My javascript function.</p>
  
  <pre><code>&lt;script&gt;
  function changeColor(e) {
      e.style.color = "red";
  }
  &lt;/script&gt;
  
  &lt;asp:LinkButton ID="LinkButton1" OnClientClick="return changeColor(this);" runat="server"&gt;LinkButton&lt;/asp:LinkButton&gt;
  </code></pre>