title: Get item index from databound control
body: <p>I want a javascript on a databound row to act on another control in the same row - show/hide for example. The classic ASP approach was to number the controls (usually by rowIndex so that they're easier to reference. I am wondering is there a way to do this in ASP.Net without writing any item command code? </p>
  
  <p>So for html to render as follows  </p>
  
  <pre><code>&lt;div onClick='actOnX0'&gt; &lt;span id=x0&gt;i am x0&lt;/span&gt;&lt;/div&gt;
  &lt;div onClick='actOnX1'&gt; &lt;span id=x1&gt;i am x1&lt;/span&gt;&lt;/div&gt;
  &lt;div onClick='actOnX2'&gt; &lt;span id=x1&gt;i am x2&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Can I insert the numbers using a databound property that returns say the  rowIndex / item index of the current row? </p>