I have a datasource in Page_Load
binded to a repeater
.
I am writing the results to the page in ItemDataBound but when it's the last row of data I require it to do something slightly different.
How do I access the row count of a data source in Page_Load from within ItemDataBound of the repeater?
I've tried:
Dim iCount As Integer
iCount = (reWorkTags.Items.Count - 1)
If e.Item.ItemIndex = iCount Then
'do for the last row
Else
'do for all other rows
End If
But both e.Item.ItemIndex and iCount equal the same for every row.
Thanks for any help. J.
Was tring to avoid using Sessions but got it working with one in the end.
I just created a session of the row count and could access that from ItemDataBound.