You could use the ItemDataBound event, which will fire once for each item
bound to the repeater, then just modify the item to include some
representation of the counter.
You could use a private field in the page class to hold the counter, reset
it to your initial value prior to calling DataBind then within the
ItemDataBound event, use the counter value and increment it.
not having much success here.
value displayed always equals total count instead of incremental step of 1
====================code======================
Dim vItemNumber As Integer = 0
......
Sub AutoNumber(o As Object, e As RepeaterItemEventArgs)
vItemNumber += 1
End Sub
.....
This will certainly work. Only one comment. PreRender event suits the task
better since the repeater is fully build at this stage and you just loop
through the items.
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.