< ItemTemplate> < %# Container.ItemIndex + 1 %> < /ItemTemplate>
Or in the ItemDataBound event (for more complex rendering) this should look like so:
if ((e.Item.ItemType == ListItemType.AlternatingItem) || (e.Item.ItemType == ListItemType.Item)) { int num = e.Item.ItemIndex + 1; // some code }
No comments:
Post a Comment