How to get index of current records in C# ASP.NET ListView in Render Time
<p>I have a list view like below:</p>

<pre><code>&lt;asp:ListView ID="lstTopRanks" runat="server"&gt;
    &lt;ItemTemplate&gt;
        &lt;div class="Amazing-{recordNumber}"&gt;{itemdata}&lt;/div&gt;
    &lt;/ItemTemplate&gt;
&lt;/asp:ListView&gt;
</code></pre>

<p>I would like to replace <code>{recordNumber}</code> with a running counter so the first record shown have 1 the second will be 2 and so on.</p>

<p>How can I do this?</p>

<p>Thanks in advance</p>
