Finding ID with Multiple ASP UserControl using JavaScript
<p>I have an ASP usercontrol name <code>ListItem</code>. Each <code>ListItem</code> has 2 ASP controls on it : a label <code>lblIndex</code> and a button <code>btnAction</code></p>

<p>On my page, I load 10 <code>ListItem</code> into a panel and set <code>lblIndex</code> on each ListPanel an appropriate index.</p>

<pre><code>ListItem 1 : lblIndex.value = '#1'
ListItem 2 : lblIndex.value = '#2'
...
ListItem 10 : lblIndex.value = '#10'
</code></pre>

<p>How do I write Javascript that, each time when I click the button on a <code>ListItem</code>, the appropriate <code>lblIndex</code>'s value will appear(through an <code>Alert()</code>). I.e. when I click the <code>btnAction</code> on the 2nd <code>ListItem</code>, the text '#2' will come out.</p>

<p>Thank you</p>
