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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top