Is there a 开发者_运维知识库way with ASP.NET to tell a data repeater which is working against a objectDataSource to only show the first row and not any others that are returned in the objectDataSource.
I can't limit the data source to one row as it's echo'ing to a grid above the repeater.
Forgive me if this is a stupid question!
Thanks in advance
C
in your repeater event handler you can use the event object to see what number the item in the collection you are on.
So you can say if that number > 0 or 1 or whatever it is, render, if not, do nothing.
It's been a really long time since I've used .NET, but I know you can lookup the index of the item in the ItemDataBound event.
精彩评论