我有一个Page_Load
绑定到repeater
.
我正在将结果写入 ItemDataBound 中的页面,但是当它是最后一行数据时,我需要它做一些稍微不同的事情。
如何从转发器的 ItemDataBound 中访问 Page_Load 中数据源的行数?
我试过了:
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
但对于每一行,e.Item.ItemIndex 和 iCount 都相等。
谢谢你的帮助。J。