Repeater: Items.count in ItemDataBound Event

  • Thread starter Thread starter Josh Daws
  • Start date Start date
J

Josh Daws

Hi,

I'm just learning asp.net. I'm very familiar with asp and coldfusion, but
I'm getting very frustrated learning asp.net. I'm working on my first
project. Basically just converting a coldfusion site to asp.net

Here's what I need to do. I have a repeater that is displaying a list of
records from the db. I need the first item and the last item displayed to
be designated as first and last. Is this possible? I know I can use
e.item.itemIndex for the current record so that takes care of the first
record, but how can I tell when the item is the last item of the repeater?

Thanks.

--

Josh Daws
428 Productions, Inc.
(770) 867-8517
www.428Productions.com

Visit www.TwoBySea.net for creative gift ideas!
 
you can use this line

myRepeater.Items.Count

it is a zero based indexing

that your last item will be at "Count - 1"

Regards
Ather Ali Shaikh
 
Back
Top