title: Table row onclick event that runs codebehind
body: <p>I've inherited an ASP.NET project that has poorly designed HTML; in one section, the <code>&lt;TR&gt;</code> tags are wrapped with an  tag to allow for &quot;click the row to view the information&quot; functionality. The code is:</p>
  <pre><code>&lt;asp:LinkButton ID=&quot;ViewArticle&quot; runat=&quot;server&quot; CommandName=&quot;Navigate&quot; CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, &quot;id&quot;) %&gt;' &gt;
      &lt;tr runat=&quot;server&quot; class=&quot;list_item&quot;&gt;
          &lt;td&gt;some data&lt;/td&gt;
          &lt;td&gt;some data&lt;/td&gt;
          &lt;td&gt;some data&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/asp:LinkButton&gt;
  </code></pre>
  <p>I'd like to do something like:</p>
  <pre><code>&lt;tr runat=&quot;server&quot; class=&quot;list_item&quot; onclick=&quot;doRowPostbackFunction('&lt;%# DataBinder.Eval(Container.DataItem, &quot;id&quot;) %&gt;');&quot;&gt;
      &lt;td&gt;some data&lt;/td&gt;
      &lt;td&gt;some data&lt;/td&gt;
      &lt;td&gt;some data&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  <p>How do I go about tying a JavaScript <code>onclick</code> event to the codebehind?</p>