add row counter in a repeater control

E

Eric Layman

Hi,

How do I add row counter to a repeater control?

<ItemTemplate>

<tr style="FONT-FAMILY:Tahoma;FONT-SIZE:10PX">

<td valign="TOP" ALIGN="LEFT"><%# GetNextNumber()%></td>

Where should the function GetNextNumber() be placed?

eg:



table

Counter | name | dob

1 | John | 01-09-2001
2 | Lenny | 01-01-92


Thanks and regards
 
G

Guest

<ItemTemplate>
<tr style="FONT-FAMILY:Tahoma;FONT-SIZE:10PX">
<td valign="TOP" ALIGN="LEFT"><%# Convert.ToString(Container.ItemIndex
+ 1) %></td>
</tr>
</itemTemplate>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top