How to get autonumber in repeater control of ASP.net

1 reply [Last post]
parth's picture
parth
User offline. Last seen 2 years 19 weeks ago. Offline
Joined: 09/20/2009

i want auto number to be generated in serial number column for the records in my ASP.NET reapeter control.it may be a single line or something but i dont know.


rajesh's picture
rajesh
User offline. Last seen 13 weeks 18 hours ago. Offline
Joined: 08/17/2009
each row has ItemIndex property

Since each row has ItemIndex property you can add a column to your control like this

< %# Container.ItemIndex + 1 %>